X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fallrss.php;h=637352bf4b32f28da288f0a147dea703c48d80cd;hb=018fd840329a64a7266acc89f76a9327c4f7a849;hp=d398c8a6ad126fbdfbe64560779943a054023fbe;hpb=0b1f48ebd0fcfed50d2110b7731196e9adcc04a6;p=quix0rs-gnu-social.git diff --git a/actions/allrss.php b/actions/allrss.php index d398c8a6ad..637352bf4b 100644 --- a/actions/allrss.php +++ b/actions/allrss.php @@ -56,11 +56,13 @@ class AllrssAction extends Rss10Action * @param array $args Web and URL arguments * * @return boolean false if user doesn't exist + * + */ function prepare($args) { parent::prepare($args); $nickname = $this->trimmed('nickname'); - $this->user = User::staticGet('nickname', $nickname); + $this->user = User::getKV('nickname', $nickname); if (!$this->user) { // TRANS: Client error when user not found for an rss related action. @@ -81,16 +83,9 @@ class AllrssAction extends Rss10Action */ function getNotices($limit=0) { - $cur = common_current_user(); - $user = $this->user; - - if (!empty($cur) && $cur->id == $user->id) { - $notice = $this->user->noticeInbox(0, $limit); - } else { - $notice = $this->user->noticesWithFriends(0, $limit); - } + $stream = new InboxNoticeStream($this->user->getProfile()); + $notice = $stream->getNotices(0, $limit, null, null); - $notice = $user->noticesWithFriends(0, $limit); $notices = array(); while ($notice->fetch()) { @@ -134,7 +129,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); } }