From: Evan Prodromou Date: Mon, 14 Mar 2011 20:19:56 +0000 (-0500) Subject: use stream-sized avatar for default profileblock X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a661b22fada7a3b698b570d6bc1d1103b361a574;p=quix0rs-gnu-social.git use stream-sized avatar for default profileblock --- diff --git a/lib/defaultprofileblock.php b/lib/defaultprofileblock.php index 18a32a0951..18eff49432 100644 --- a/lib/defaultprofileblock.php +++ b/lib/defaultprofileblock.php @@ -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;