Re-add page title to RSS feeds
authorMarcel Werk <burntime@woltlab.com>
Mon, 23 Dec 2024 15:30:47 +0000 (16:30 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 23 Dec 2024 15:30:47 +0000 (16:30 +0100)
ref https://www.woltlab.com/community/thread/310335-forenname-nicht-mehr-im-titel-des-feeds-vorhanden/

wcfsetup/install/files/lib/page/ArticleRssFeedPage.class.php
wcfsetup/install/files/lib/page/NotificationRssFeedPage.class.php

index a6a38f21cdc2ea03e63c0262caddddffa9275872..29ae6c54859a2ade28726719bcbd40b535eba74f 100644 (file)
@@ -65,10 +65,18 @@ class ArticleRssFeedPage extends AbstractRssFeedPage
         $feed = new RssFeed();
         $channel = $this->getDefaultChannel();
         if (isset($this->category)) {
-            $channel->title($this->category->getTitle());
+            $channel->title(\sprintf(
+                '%s - %s',
+                $this->category->getTitle(),
+                WCF::getLanguage()->get(\PAGE_TITLE)
+            ));
             $channel->description($this->category->getDecoratedObject()->getDescription());
         } else {
-            $channel->title(WCF::getLanguage()->get('wcf.article.articles'));
+            $channel->title(\sprintf(
+                '%s - %s',
+                WCF::getLanguage()->get('wcf.article.articles'),
+                WCF::getLanguage()->get(\PAGE_TITLE)
+            ));
         }
 
         if ($this->articles->valid()) {
index e29f856e52307f05e0dc4fe241af74f0fc34b574..393f381380cdbbeda8cc4fcac5c91e723a36bb9f 100644 (file)
@@ -34,7 +34,11 @@ class NotificationRssFeedPage extends AbstractRssFeedPage
     {
         $feed = new RssFeed();
         $channel = $this->getDefaultChannel();
-        $channel->title(WCF::getLanguage()->get('wcf.user.menu.community.notification'));
+        $channel->title(\sprintf(
+            '%s - %s',
+            WCF::getLanguage()->get('wcf.user.menu.community.notification'),
+            WCF::getLanguage()->get(\PAGE_TITLE)
+        ));
         $feed->channel($channel);
 
         $notifications = UserNotificationHandler::getInstance()->getNotifications(20);