]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticesection.php
Properly unlink all old avatars when deleting/uploading a new
[quix0rs-gnu-social.git] / lib / noticesection.php
index 2edd6e09a508db4877485856fe1cf16ab34f58bb..4c6aeb3b5dd3520eebb15b06f3ad980729454748 100644 (file)
@@ -78,14 +78,14 @@ class NoticeSection extends Section
         }
         $this->out->elementStart('li', 'hentry notice');
         $this->out->elementStart('div', 'entry-title');
-        $avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
         $this->out->elementStart('span', 'vcard author');
         $this->out->elementStart('a', array('title' => ($profile->fullname) ?
                                             $profile->fullname :
                                             $profile->nickname,
                                             'href' => $profile->profileurl,
                                             'class' => 'url'));
-        $this->out->element('img', array('src' => (($avatar) ? $avatar->displayUrl() :  Avatar::defaultImage(AVATAR_MINI_SIZE)),
+        $avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE);
+        $this->out->element('img', array('src' => $avatarUrl,
                                          'width' => AVATAR_MINI_SIZE,
                                          'height' => AVATAR_MINI_SIZE,
                                          'class' => 'avatar photo',