From a661b22fada7a3b698b570d6bc1d1103b361a574 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 14 Mar 2011 15:19:56 -0500 Subject: [PATCH] use stream-sized avatar for default profileblock --- lib/defaultprofileblock.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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;