override linkAttributes() method for groupmembersminilist

This commit is contained in:
Evan Prodromou 2010-04-05 10:47:07 -04:00
parent 2e51d33145
commit 96761c14ea

View File

@ -392,8 +392,8 @@ class ShowgroupAction extends GroupDesignAction
$this->element('h2', null, _('Members')); $this->element('h2', null, _('Members'));
$pml = new ProfileMiniList($member, $this); $gmml = new GroupMembersMiniList($member, $this);
$cnt = $pml->show(); $cnt = $gmml->show();
if ($cnt == 0) { if ($cnt == 0) {
$this->element('p', null, _('(None)')); $this->element('p', null, _('(None)'));
} }
@ -507,3 +507,26 @@ class GroupAdminSection extends ProfileSection
return null; return null;
} }
} }
class GroupMembersMiniList extends ProfileMiniList
{
function newListItem($profile)
{
return new GroupMembersMiniListItem($profile, $this->action);
}
}
class GroupMembersMiniListItem extends ProfileMiniListItem
{
function linkAttributes()
{
$aAttrs = parent::linkAttributes();
if (common_config('nofollow', 'members')) {
$aAttrs['rel'] .= ' nofollow';
}
return $aAttrs;
}
}