]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use stream-sized avatar for default profileblock
authorEvan Prodromou <evan@status.net>
Mon, 14 Mar 2011 20:19:56 +0000 (15:19 -0500)
committerEvan Prodromou <evan@status.net>
Wed, 16 Mar 2011 13:57:10 +0000 (09:57 -0400)
lib/defaultprofileblock.php

index 18a32a09516c1aea99e3fbb70c0962be37509b8f..18eff49432062050f67214b8e27c8897a6111a1a 100644 (file)
@@ -56,6 +56,22 @@ class DefaultProfileBlock extends AccountProfileBlock
         parent::__construct($out, $user->getProfile());
     }
 
+    function avatarSize()
+    {
+        return AVATAR_STREAM_SIZE;
+    }
+
+    function avatar()
+    {
+        $avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
+        if (empty($avatar)) {
+            $avatar = $this->profile->getAvatar(73);
+        }
+        return (!empty($avatar)) ? 
+            $avatar->displayUrl() : 
+            Avatar::defaultImage(AVATAR_STREAM_SIZE);
+    }
+
     function canEdit()
     {
         return true;