]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profilesection.php
Properly unlink all old avatars when deleting/uploading a new
[quix0rs-gnu-social.git] / lib / profilesection.php
index f8a65a9dc8c53e9f0c84891b79ba6dea9d929b3c..676fcd35402d47a33f53902856239b262ee7a239 100644 (file)
@@ -27,7 +27,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -85,14 +85,16 @@ class ProfileSection extends Section
                                        'href' => $profile->profileurl,
                                        'rel' => 'contact member',
                                        'class' => 'url'));
-        $avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
-        $this->out->element('img', array('src' => (($avatar) ? $avatar->displayUrl() :  Avatar::defaultImage(AVATAR_MINI_SIZE)),
+        $this->out->text(' ');
+        $avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE);
+        $this->out->element('img', array('src' => $avatarUrl,
                                     'width' => AVATAR_MINI_SIZE,
                                     'height' => AVATAR_MINI_SIZE,
                                     'class' => 'avatar photo',
                                     'alt' =>  ($profile->fullname) ?
                                     $profile->fullname :
                                     $profile->nickname));
+        $this->out->text(' ');
         $this->out->element('span', 'fn nickname', $profile->nickname);
         $this->out->elementEnd('a');
         $this->out->elementEnd('span');