]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinehome.php
Properly unlink all old avatars when deleting/uploading a new
[quix0rs-gnu-social.git] / actions / apitimelinehome.php
index 1ca74b208e7bc261780d2237d4a140282c640af6..7ef3da79f0de65c11471623fd693d392c5dcfd31 100644 (file)
@@ -105,7 +105,6 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
     function showTimeline()
     {
         $profile    = $this->user->getProfile();
-        $avatar     = $profile->getAvatar(AVATAR_PROFILE_SIZE);
         $sitename   = common_config('site', 'name');
         // TRANS: Timeline title for user and friends. %s is a user nickname.
         $title      = sprintf(_("%s and friends"), $this->user->nickname);
@@ -118,17 +117,11 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
             $this->user->nickname, $sitename
         );
 
-        $link = common_local_url(
-            'all',
-            array('nickname' => $this->user->nickname)
-        );
-
+        $logo = $profile->avatarUrl(AVATAR_PROFILE_SIZE);
+        $link = common_local_url('all',
+                    array('nickname' => $this->user->nickname));
         $self = $this->getSelfUri();
 
-        $logo = (!empty($avatar))
-            ? $avatar->displayUrl()
-            : Avatar::defaultImage(AVATAR_PROFILE_SIZE);
-
         switch($this->format) {
         case 'xml':
             $this->showXmlTimeline($this->notices);