X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fgroupprofileblock.php;h=1a15c34bb1c4259ba4810e17ce869b31bdb28fa0;hb=6f593a79d4b090b6afb6353a1f7e50f3fbfdc1b6;hp=87ec174dc6f336c0a9ef1d6efc7575e573331fd5;hpb=206c09068884f701d9dc295c851a1216c5839ff3;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()