X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fallrss.php;h=6d82e551e7cd6fa73395dce2281d3933168ad260;hb=88c00facc807d1c138146c02c703e2294b5d357b;hp=4a5d15c7b72e7b20aa5bc642bd06382d93d664de;hpb=5ab709b73977131813884558bf56d97172a7aa26;p=quix0rs-gnu-social.git diff --git a/actions/allrss.php b/actions/allrss.php index 4a5d15c7b7..6d82e551e7 100644 --- a/actions/allrss.php +++ b/actions/allrss.php @@ -1,5 +1,4 @@ user = User::staticGet('nickname', $nickname); if (!$this->user) { + // TRANS: Client error when user not found for an rss related action. $this->clientError(_('No such user.')); return false; } else { @@ -82,16 +83,9 @@ class AllrssAction extends Rss10Action */ function getNotices($limit=0) { - $cur = common_current_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); + $notice = $stream->getNotices(0, $limit, null, null); - $user = $this->user; - $notice = $user->noticesWithFriends(0, $limit); $notices = array(); while ($notice->fetch()) { @@ -112,10 +106,12 @@ class AllrssAction extends Rss10Action $c = array('url' => common_local_url('allrss', array('nickname' => $user->nickname)), + // TRANS: Message is used as link title. %s is a user nickname. 'title' => sprintf(_('%s and friends'), $user->nickname), 'link' => common_local_url('all', array('nickname' => $user->nickname)), + // TRANS: Message is used as link description. %1$s is a username, %2$s is a site name. 'description' => sprintf(_('Updates from %1$s and friends on %2$s!'), $user->nickname, common_config('site', 'name'))); return $c; @@ -125,7 +121,7 @@ class AllrssAction extends Rss10Action * Get image. * * @return string user avatar URL or null - */ + */ function getImage() { $user = $this->user; @@ -137,4 +133,3 @@ class AllrssAction extends Rss10Action return $avatar ? $avatar->url : null; } } -