3 namespace wcf\system\user\notification\object\type;
5 use wcf\data\comment\Comment;
6 use wcf\data\comment\CommentList;
7 use wcf\system\user\notification\object\CommentUserNotificationObject;
11 * Represents a comment notification object type for comments on articles.
13 * @author Joshua Ruesweg
14 * @copyright 2001-2019 WoltLab GmbH
15 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
16 * @package WoltLabSuite\Core\System\User\Notification\Object\Type
19 class ArticleCommentUserNotificationObjectType extends AbstractUserNotificationObjectType implements
20 ICommentUserNotificationObjectType
25 protected static $decoratorClassName = CommentUserNotificationObject::class;
30 protected static $objectClassName = Comment::class;
35 protected static $objectListClassName = CommentList::class;
40 public function getOwnerID($objectID)
42 $sql = "SELECT article.userID
43 FROM wcf" . WCF_N . "_comment comment
44 LEFT JOIN wcf" . WCF_N . "_article article
45 ON article.articleID = comment.objectID
46 WHERE comment.commentID = ?";
47 $statement = WCF::getDB()->prepareStatement($sql);
48 $statement->execute([$objectID]);
50 return $statement->fetchSingleColumn() ?: 0;