]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Bookmark/actions/apitimelinebookmarks.php
Properly unlink all old avatars when deleting/uploading a new
[quix0rs-gnu-social.git] / plugins / Bookmark / actions / apitimelinebookmarks.php
index 58aac5d21c0e193f7d1d210c1d1d4774bafd76c7..4cc0dcde7f74d2bacd549e43553aba338f804557 100644 (file)
@@ -97,7 +97,6 @@ class ApiTimelineBookmarksAction extends ApiBareAuthAction
     function showTimeline()
     {
         $profile  = $this->user->getProfile();
-        $avatar   = $profile->getAvatar(AVATAR_PROFILE_SIZE);
 
         $sitename = common_config('site', 'name');
         $title    = sprintf(
@@ -120,15 +119,10 @@ class ApiTimelineBookmarksAction extends ApiBareAuthAction
             $profile->getBestName(),
             $this->user->nickname
         );
-        $logo = !empty($avatar)
-            ? $avatar->displayUrl()
-            : Avatar::defaultImage(AVATAR_PROFILE_SIZE);
-
-        $link = common_local_url(
-            'bookmarks',
-            array('nickname' => $this->user->nickname)
-        );
 
+        $logo = $profile->avatarUrl(AVATAR_PROFILE_SIZE);
+        $link = common_local_url('bookmarks',
+                                array('nickname' => $this->user->nickname));
         $self = $this->getSelfUri();
 
         switch($this->format) {