X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinefavorites.php;h=1027d97d440047f77c3401b9b446b070a974137f;hb=245510e4b05896e88a4f410a2668b28f57dd8ca1;hp=d35e051835aad1cbe9dea1571def59e5bbbb5dea;hpb=b08d16ef2bf5995ca2feee2d2688e0080eaf5124;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinefavorites.php b/actions/apitimelinefavorites.php index d35e051835..1027d97d44 100644 --- a/actions/apitimelinefavorites.php +++ b/actions/apitimelinefavorites.php @@ -21,8 +21,9 @@ * * @category API * @package StatusNet - * @author Zach Copley - * @copyright 2009 StatusNet, Inc. + * @author Craig Andrews + * @author Evan Prodromou + * @author Zach Copley * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -39,6 +40,8 @@ require_once INSTALLDIR.'/lib/apibareauth.php'; * * @category API * @package StatusNet + * @author Craig Andrews + * @author Evan Prodromou * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ @@ -64,7 +67,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction $this->user = $this->getTargetUser($this->arg('id')); if (empty($this->user)) { - $this->clientError(_('No such user!'), 404, $this->format); + $this->clientError(_('No such user.'), 404, $this->format); return; } @@ -98,10 +101,11 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction function showTimeline() { $profile = $this->user->getProfile(); + $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); $sitename = common_config('site', 'name'); $title = sprintf( - _('%s / Favorites from %s'), + _('%1$s / Favorites from %2$s'), $sitename, $this->user->nickname ); @@ -113,32 +117,33 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction array('nickname' => $this->user->nickname) ); $subtitle = sprintf( - _('%s updates favorited by %s / %s.'), + _('%1$s updates favorited by %2$s / %2$s.'), $sitename, $profile->getBestName(), $this->user->nickname ); + $logo = ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE); switch($this->format) { case 'xml': - $this->show_xml_timeline($this->notices); + $this->showXmlTimeline($this->notices); break; case 'rss': - $this->show_rss_timeline($this->notices, $title, $link, $subtitle); + $this->showRssTimeline($this->notices, $title, $link, $subtitle, null, $logo); break; case 'atom': $selfuri = common_root_url() . ltrim($_SERVER['QUERY_STRING'], 'p='); - $this->show_atom_timeline( + $this->showAtomTimeline( $this->notices, $title, $id, $link, $subtitle, - null, $selfuri + null, $selfuri, $logo ); break; case 'json': - $this->show_json_timeline($this->notices); + $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } }