X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fgroupprofileblock.php;h=1a15c34bb1c4259ba4810e17ce869b31bdb28fa0;hb=c9a9a8bc58d613056a5a584a203889fd602d8ac1;hp=87ec174dc6f336c0a9ef1d6efc7575e573331fd5;hpb=3fc1d245a179efabfa862d3539642fe0fc67f856;p=quix0rs-gnu-social.git diff --git a/lib/groupprofileblock.php b/lib/groupprofileblock.php index 87ec174dc6..1a15c34bb1 100644 --- a/lib/groupprofileblock.php +++ b/lib/groupprofileblock.php @@ -52,12 +52,17 @@ class GroupProfileBlock extends ProfileBlock { parent::__construct($out); $this->group = $group; + $this->profile = $this->group->getProfile(); } - function avatar() - { - return ($this->group->homepage_logo) ? - $this->group->homepage_logo : User_group::defaultLogo(AVATAR_PROFILE_SIZE); + protected function showAvatar(Profile $profile, $size=null) + { + $avatar_url = $profile->getGroup()->homepage_logo ?: User_group::defaultLogo($size ?: $this->avatarSize()); + $this->out->element('img', array('src' => $avatar_url, + 'class' => 'avatar u-photo', + 'width' => $this->avatarSize(), + 'height' => $this->avatarSize(), + 'alt' => $profile->getBestName())); } function name()