]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/allrss.php
Added new 'Scroller' plugin from @buttle which aims to replace the out-dated
[quix0rs-gnu-social.git] / actions / allrss.php
index 90e6f7a86aa01d5d02343d4cc6c8d0e5fb9ae10d..486232c092812676cf9024dc90a78c894bb66854 100644 (file)
@@ -58,7 +58,7 @@ class AllrssAction extends Rss10Action
      * @return boolean false if user doesn't exist
      *
      */
-    function prepare($args)
+    function prepare(array $args=array())
     {
         parent::prepare($args);
         $nickname   = $this->trimmed('nickname');
@@ -67,7 +67,6 @@ class AllrssAction extends Rss10Action
         if (!$this->user) {
             // TRANS: Client error when user not found for an rss related action.
             $this->clientError(_('No such user.'));
-            return false;
         } else {
             $this->notices = $this->getNotices($this->limit);
             return true;
@@ -83,7 +82,7 @@ class AllrssAction extends Rss10Action
      */
     function getNotices($limit=0)
     {
-        $stream = new InboxNoticeStream($this->user);
+        $stream = new InboxNoticeStream($this->user->getProfile());
         $notice = $stream->getNotices(0, $limit, null, null);
 
         $notices = array();
@@ -129,7 +128,6 @@ class AllrssAction extends Rss10Action
         if (!$profile) {
             return null;
         }
-        $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
-        return $avatar ? $avatar->url : null;
+        return $profile->avatarUrl(AVATAR_PROFILE_SIZE);
     }
 }