]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinementions.php
Properly unlink all old avatars when deleting/uploading a new
[quix0rs-gnu-social.git] / actions / apitimelinementions.php
index 4ba8a4966b195a33043eb6e68219e25571e77111..aff4f318e945cf0ae940cc63e399d422b3696e7d 100644 (file)
@@ -104,7 +104,6 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
     function showTimeline()
     {
         $profile = $this->user->getProfile();
-        $avatar     = $profile->getAvatar(AVATAR_PROFILE_SIZE);
 
         $sitename   = common_config('site', 'name');
         $title      = sprintf(
@@ -115,11 +114,10 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
         );
         $taguribase = TagURI::base();
         $id         = "tag:$taguribase:Mentions:" . $this->user->id;
-        $link       = common_local_url(
-            'replies',
-            array('nickname' => $this->user->nickname)
-        );
 
+        $logo = $profile->avatarUrl(AVATAR_PROFILE_SIZE);
+        $link = common_local_url('replies',
+                    array('nickname' => $this->user->nickname));
         $self = $this->getSelfUri();
 
         $subtitle   = sprintf(
@@ -129,7 +127,6 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
             _('%1$s updates that reply to updates from %2$s / %3$s.'),
             $sitename, $this->user->nickname, $profile->getBestName()
         );
-        $logo = ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE);
 
         switch($this->format) {
         case 'xml':