<definitionname>com.woltlab.wcf.boxController</definitionname>
<classname>wcf\system\box\ArticleListBoxController</classname>
</type>
+ <type>
+ <name>com.woltlab.wcf.articleCommentList</name>
+ <definitionname>com.woltlab.wcf.boxController</definitionname>
+ <classname>wcf\system\box\ArticleCommentListBoxController</classname>
+ </type>
<type>
<name>com.woltlab.wcf.whoWasOnline</name>
<definitionname>com.woltlab.wcf.boxController</definitionname>
--- /dev/null
+<?php
+namespace wcf\system\box;
+use wcf\data\article\Article;
+use wcf\data\article\category\ArticleCategory;
+use wcf\data\comment\ViewableCommentList;
+use wcf\system\language\LanguageFactory;
+use wcf\system\WCF;
+
+/**
+ * Box controller implementation for a list of article comments.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2016 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core\System\Box
+ */
+class ArticleCommentListBoxController extends AbstractCommentListBoxController {
+ /**
+ * @inheritDoc
+ */
+ protected $objectTypeName = 'com.woltlab.wcf.articleComment';
+
+ /**
+ * @inheritDoc
+ */
+ protected function applyObjectTypeFilters(ViewableCommentList $commentList) {
+ $accessibleCategoryIDs = ArticleCategory::getAccessibleCategoryIDs();
+ if (!empty($accessibleCategoryIDs)) {
+ $commentList->sqlJoins .= ' INNER JOIN wcf' . WCF_N . '_article_content article_content ON (article_content.articleContentID = comment.objectID)';
+ $commentList->sqlJoins .= ' INNER JOIN wcf' . WCF_N . '_article article ON (article.articleID = article_content.articleID)';
+ $commentList->sqlSelects = 'article_content.title';
+
+ $commentList->getConditionBuilder()->add('article.categoryID IN (?)', [$accessibleCategoryIDs]);
+ $commentList->getConditionBuilder()->add('article.publicationStatus = ?', [Article::PUBLISHED]);
+
+ // apply language filter
+ if (LanguageFactory::getInstance()->multilingualismEnabled() && !empty(WCF::getUser()->getLanguageIDs())) {
+ $commentList->getConditionBuilder()->add('(article_content.languageID IN (?) OR article_content.languageID IS NULL)', [WCF::getUser()->getLanguageIDs()]);
+ }
+ }
+ else {
+ $commentList->getConditionBuilder()->add('0 = 1');
+ }
+ }
+}
<item name="wcf.acp.box.visibilityException.visible"><![CDATA[Box auf ausgewählten Seiten <strong>explizit anzeigen</strong>]]></item>
<item name="wcf.acp.box.visibilityException.hidden"><![CDATA[Box auf ausgewählten Seiten <strong>nicht anzeigen</strong>]]></item>
<item name="wcf.acp.box.boxController.com.woltlab.wcf.articleCategories"><![CDATA[Artikel-Kategorien]]></item>
+ <item name="wcf.acp.box.boxController.com.woltlab.wcf.articleCommentList"><![CDATA[Artikel-Kommentare]]></item>
<item name="wcf.acp.box.boxController.com.woltlab.wcf.articleList"><![CDATA[Artikel]]></item>
<item name="wcf.acp.box.boxController.com.woltlab.wcf.followingsOnline"><![CDATA[Benutzer online, denen der aktive Nutzer folgt]]></item>
<item name="wcf.acp.box.boxController.com.woltlab.wcf.pageCommentList"><![CDATA[Seiten-Kommentare]]></item>
<item name="wcf.acp.box.visibilityException.visible"><![CDATA[Choose Where the Box Will be Explicitly <strong>Visible</strong>]]></item>
<item name="wcf.acp.box.visibilityException.hidden"><![CDATA[Choose Where the Box Will be Explicitly <strong>Hidden</strong>]]></item>
<item name="wcf.acp.box.boxController.com.woltlab.wcf.articleCategories"><![CDATA[Article Categories]]></item>
+ <item name="wcf.acp.box.boxController.com.woltlab.wcf.articleCommentList"><![CDATA[Article Comments]]></item>
<item name="wcf.acp.box.boxController.com.woltlab.wcf.articleList"><![CDATA[Articles]]></item>
<item name="wcf.acp.box.boxController.com.woltlab.wcf.followingsOnline"><![CDATA[Users Online Followed by Active User]]></item>
<item name="wcf.acp.box.boxController.com.woltlab.wcf.pageCommentList"><![CDATA[Page Comments]]></item>