diff --git a/wcfsetup/install/files/lib/data/article/FeedArticle.class.php b/wcfsetup/install/files/lib/data/article/FeedArticle.class.php deleted file mode 100644 index 8c5b22880b..0000000000 --- a/wcfsetup/install/files/lib/data/article/FeedArticle.class.php +++ /dev/null @@ -1,105 +0,0 @@ - - * @deprecated 6.1 - */ -class FeedArticle extends ViewableArticle implements IFeedEntryWithEnclosure -{ - use TUserContent; - - /** - * @var FeedEnclosure - */ - protected $enclosure; - - #[\Override] - public function getLink(): string - { - return $this->getDecoratedObject()->getLink(); - } - - #[\Override] - public function getTitle(): string - { - return $this->getDecoratedObject()->getTitle(); - } - - #[\Override] - public function getFormattedMessage() - { - return $this->getDecoratedObject()->getFormattedContent(); - } - - #[\Override] - public function getMessage() - { - return $this->getDecoratedObject()->getTeaser(); - } - - #[\Override] - public function getExcerpt(int $maxLength = 255) - { - return StringUtil::truncateHTML($this->getDecoratedObject()->getFormattedTeaser(), $maxLength); - } - - #[\Override] - public function __toString(): string - { - return $this->getMessage(); - } - - #[\Override] - public function getComments() - { - return $this->getArticleContent()->comments; - } - - #[\Override] - public function getCategories() - { - $categories = []; - $category = $this->getDecoratedObject()->getCategory(); - if ($category !== null) { - $categories[] = $category->getTitle(); - foreach ($category->getParentCategories() as $category) { - $categories[] = $category->getTitle(); - } - } - - return $categories; - } - - #[\Override] - public function isVisible() - { - return $this->canRead(); - } - - #[\Override] - public function getEnclosure() - { - if ($this->enclosure === null) { - if ($this->getImage() !== null) { - $this->enclosure = new FeedEnclosure( - $this->getImage()->getThumbnailLink('small'), - $this->getImage()->smallThumbnailType, - $this->getImage()->smallThumbnailSize - ); - } - } - - return $this->enclosure; - } -} diff --git a/wcfsetup/install/files/lib/data/article/FeedArticleList.class.php b/wcfsetup/install/files/lib/data/article/FeedArticleList.class.php deleted file mode 100644 index f76f441264..0000000000 --- a/wcfsetup/install/files/lib/data/article/FeedArticleList.class.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @deprecated 6.1 - * - * @method FeedArticle current() - * @method FeedArticle[] getObjects() - * @method FeedArticle|null getSingleObject() - * @method FeedArticle|null search($objectID) - */ -class FeedArticleList extends CategoryArticleList -{ - /** - * @inheritDoc - */ - public $decoratorClassName = FeedArticle::class; - - /** - * Creates a new FeedArticleList object. - * - * @param int $categoryID - */ - public function __construct($categoryID = 0) - { - if ($categoryID) { - parent::__construct($categoryID, true); - } else { - AccessibleArticleList::__construct(); - } - } -} diff --git a/wcfsetup/install/files/lib/page/ArticleFeedPage.class.php b/wcfsetup/install/files/lib/page/ArticleFeedPage.class.php deleted file mode 100644 index b68bfbbc57..0000000000 --- a/wcfsetup/install/files/lib/page/ArticleFeedPage.class.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * @extends AbstractFeedPage - * @deprecated 6.1 use `ArticleRssFeedPage` instead - */ -class ArticleFeedPage extends AbstractFeedPage -{ - /** - * category the listed articles belong to - * @var ArticleCategory - */ - public $category; - - /** - * id of the category the listed articles belong to - * @var int - */ - public $categoryID = 0; - - #[\Override] - public function readParameters() - { - parent::readParameters(); - - if (isset($_REQUEST['id'])) { - $this->categoryID = \intval($_REQUEST['id']); - $this->category = ArticleCategory::getCategory($this->categoryID); - if ($this->category === null) { - throw new IllegalLinkException(); - } - if (!$this->category->isAccessible()) { - throw new PermissionDeniedException(); - } - } - - $this->redirectToNewPage(ArticleRssFeedPage::class); - } - - #[\Override] - public function readData() - { - parent::readData(); - - // read the articles - $this->items = new FeedArticleList($this->categoryID); - $this->items->sqlOrderBy = 'article.time ' . ARTICLE_SORT_ORDER; - $this->items->sqlLimit = 20; - $this->items->readObjects(); - - // set title - if ($this->category !== null) { - $this->title = $this->category->getTitle(); - } else { - $this->title = WCF::getLanguage()->get('wcf.article.articles'); - } - } - - #[\Override] - public function assignVariables() - { - parent::assignVariables(); - - WCF::getTPL()->assign([ - 'supportsEnclosure' => true, - ]); - } -} diff --git a/wcfsetup/install/files/lib/page/NotificationFeedPage.class.php b/wcfsetup/install/files/lib/page/NotificationFeedPage.class.php deleted file mode 100644 index 6c1e684495..0000000000 --- a/wcfsetup/install/files/lib/page/NotificationFeedPage.class.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * @extends AbstractFeedPage<\ArrayIterator> - * @deprecated 6.1 use `NotificationRssFeedPage` instead - */ -class NotificationFeedPage extends AbstractFeedPage -{ - #[\Override] - public function readParameters() - { - parent::readParameters(); - - if (!WCF::getUser()->userID) { - throw new IllegalLinkException(); - } - - $this->title = WCF::getLanguage()->get('wcf.user.menu.community.notification'); - - $this->redirectToNewPage(NotificationRssFeedPage::class); - } - - #[\Override] - public function readData() - { - parent::readData(); - - $this->items = new \ArrayIterator(); - - $notifications = UserNotificationHandler::getInstance()->getNotifications(20); - - foreach ($notifications['notifications'] as $notification) { - $this->items->append($notification['event']); - } - } -} diff --git a/wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php index 207195d965..bde9b9e01b 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php @@ -3,7 +3,7 @@ namespace wcf\system\user\notification\event; use wcf\data\DatabaseObjectDecorator; -use wcf\data\IFeedEntry; +use wcf\data\IMessage; use wcf\data\language\Language; use wcf\data\user\notification\event\UserNotificationEvent; use wcf\data\user\notification\UserNotification; @@ -25,7 +25,7 @@ */ abstract class AbstractUserNotificationEvent extends DatabaseObjectDecorator implements IUserNotificationEvent, - IFeedEntry + IMessage { /** * @inheritDoc @@ -257,13 +257,19 @@ public function getUserNotificationObject() return $this->userNotificationObject; } - #[\Override] + /** + * @return int + * @deprecated 6.3 No longer in use. + */ public function getComments() { return 0; } - #[\Override] + /** + * @return string[] + * @deprecated 6.3 No longer in use. + */ public function getCategories() { return [