RSS feed overhaul
authorMarcel Werk <burntime@woltlab.com>
Tue, 29 Jan 2013 03:19:11 +0000 (04:19 +0100)
committerMarcel Werk <burntime@woltlab.com>
Tue, 29 Jan 2013 03:19:11 +0000 (04:19 +0100)
files/lib/data/conversation/FeedConversation.class.php
files/lib/page/ConversationFeedPage.class.php
templates/conversationList.tpl

index eb146db6da86a92f4a59402d55d0fe70f5271d43..442265a73d2ab563c49ac501d70745aff4de4a81 100644 (file)
@@ -59,21 +59,21 @@ class FeedConversation extends DatabaseObjectDecorator implements IFeedEntry {
         * @see wcf\data\IMessage::getUserID()
         */
        public function getUserID() {
-               return $this->getDecoratedObject()->userID;
+               return $this->getDecoratedObject()->lastPosterID;
        }
        
        /**
         * @see wcf\data\IMessage::getUsername()
         */
        public function getUsername() {
-               return $this->getDecoratedObject()->username;
+               return $this->getDecoratedObject()->lastPoster;
        }
        
        /**
         * @see wcf\data\IMessage::getTime()
         */
        public function getTime() {
-               return $this->getDecoratedObject()->time;
+               return $this->getDecoratedObject()->lastPostTime;
        }
        
        /**
@@ -82,4 +82,18 @@ class FeedConversation extends DatabaseObjectDecorator implements IFeedEntry {
        public function __toString() {
                return $this->getDecoratedObject()->__toString();
        }
+       
+       /**
+        * @see wcf\data\IFeedEntry::getComments()
+        */
+       public function getComments() {
+               return $this->replies;
+       }
+       
+       /**
+        * @see wcf\data\IFeedEntry::getCategories()
+        */
+       public function getCategories() {
+               return array();
+       }
 }
index 1cb3cbdb6ab2ab00d230584026fd88480cd05887..ac21164bea5bf6d4dccccb0889d7865c96d494d6 100644 (file)
@@ -29,6 +29,7 @@ class ConversationFeedPage extends AbstractFeedPage {
                $this->items->getConditionBuilder()->add('conversation_to_user.participantID = ?', array(WCF::getUser()->userID));
                $this->items->getConditionBuilder()->add('conversation_to_user.hideConversation = ?', array(0));
                $this->items->sqlConditionJoins = "LEFT JOIN wcf".WCF_N."_conversation conversation ON (conversation.conversationID = conversation_to_user.conversationID)";
+               $this->items->sqlLimit = 20;
                $this->items->readObjects();
                
                $this->title = WCF::getLanguage()->get('wcf.conversation.conversations');
index 5e88b8422879b9ce838944707803ea38a1a2010a..a1f78e78e0c094f7818113aa39d3598fd9a1a00c 100644 (file)
 {/capture}
 
 {capture assign='headerNavigation'}
-       <li><a href="{link controller='ConversationFeed' appendSession=false}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}" title="{lang}wcf.global.button.rss{/lang}" class="jsTooltip"><span class="icon icon16 icon-rss"></span> <span class="invisible">{lang}wcf.global.button.rss{/lang}</span></a></li>
+       <li><a rel="alternate" href="{link controller='ConversationFeed' appendSession=false}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}" title="{lang}wcf.global.button.rss{/lang}" class="jsTooltip"><span class="icon icon16 icon-rss"></span> <span class="invisible">{lang}wcf.global.button.rss{/lang}</span></a></li>
 {/capture}
 
 {include file='header' sidebarOrientation='left'}