]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinefavorites.php
Lots of tiny message changes.
[quix0rs-gnu-social.git] / actions / apitimelinefavorites.php
index f84d7b4cb7eee65ff23aa300576757efd1184d5c..1027d97d440047f77c3401b9b446b070a974137f 100644 (file)
@@ -101,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
         );
@@ -116,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->showXmlTimeline($this->notices);
             break;
         case 'rss':
-            $this->showRssTimeline($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->showAtomTimeline(
                 $this->notices, $title, $id, $link, $subtitle,
-                null, $selfuri
+                null, $selfuri, $logo
             );
             break;
         case 'json':
             $this->showJsonTimeline($this->notices);
             break;
         default:
-            $this->clientError(_('API method not found!'), $code = 404);
+            $this->clientError(_('API method not found.'), $code = 404);
             break;
         }
     }