<?php
namespace wcf\data\article;
use wcf\data\article\category\ArticleCategory;
+use wcf\system\WCF;
/**
* Represents a list of accessible articles.
else {
$this->getConditionBuilder()->add('article.categoryID IN (?)', [$accessibleCategoryIDs]);
$this->getConditionBuilder()->add('article.publicationStatus = ?', [Article::PUBLISHED]);
+
+ if (!WCF::getSession()->getPermission('admin.content.article.canManageArticle')) {
+ $this->getConditionBuilder()->add('article.isDeleted = ?', [0]);
+ }
}
}
}
* @return boolean
*/
public function canRead() {
+ if ($this->isDeleted && !WCF::getSession()->getPermission('admin.content.article.canManageArticle')) {
+ return false;
+ }
+
if ($this->publicationStatus != self::PUBLISHED) {
if (!WCF::getSession()->getPermission('admin.content.article.canManageArticle') && (!WCF::getSession()->getPermission('admin.content.article.canContributeArticle') || $this->userID != WCF::getUser()->userID)) {
return false;