X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fgroupmembers.php;h=e72ef371acad7fe36fc67e1d9c96eb2c1d3b16fd;hb=8957d2bdea569594593c55b7d84f05e2998c0633;hp=b326a0df75f2b8f80b05f24c039789be96791bbd;hpb=384a50a7800abde62e040ea57872dc06c0519047;p=quix0rs-gnu-social.git diff --git a/actions/groupmembers.php b/actions/groupmembers.php index b326a0df75..e72ef371ac 100644 --- a/actions/groupmembers.php +++ b/actions/groupmembers.php @@ -73,14 +73,21 @@ class GroupmembersAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } - $this->group = User_group::staticGet('nickname', $nickname); + $local = Local_group::staticGet('nickname', $nickname); + + if (!$local) { + $this->clientError(_('No such group.'), 404); + return false; + } + + $this->group = User_group::staticGet('id', $local->group_id); if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } @@ -93,7 +100,7 @@ class GroupmembersAction extends GroupDesignAction return sprintf(_('%s group members'), $this->group->nickname); } else { - return sprintf(_('%s group members, page %d'), + return sprintf(_('%1$s group members, page %2$d'), $this->group->nickname, $this->page); } @@ -192,7 +199,9 @@ class GroupMemberListItem extends ProfileListItem { $user = common_current_user(); - if (!empty($user) && $user->id != $this->profile->id && $user->isAdmin($this->group) && + if (!empty($user) && + $user->id != $this->profile->id && + ($user->isAdmin($this->group) || $user->hasRight(Right::MAKEGROUPADMIN)) && !$this->profile->isAdmin($this->group)) { $this->out->elementStart('li', 'entity_make_admin'); $maf = new MakeAdminForm($this->out, $this->profile, $this->group, @@ -203,6 +212,7 @@ class GroupMemberListItem extends ProfileListItem } } + function showGroupBlockForm() { $user = common_current_user(); @@ -215,7 +225,28 @@ class GroupMemberListItem extends ProfileListItem $bf->show(); $this->out->elementEnd('li'); } + } + + function linkAttributes() + { + $aAttrs = parent::linkAttributes(); + + if (common_config('nofollow', 'members')) { + $aAttrs['rel'] .= ' nofollow'; + } + + return $aAttrs; + } + + function homepageAttributes() + { + $aAttrs = parent::linkAttributes(); + + if (common_config('nofollow', 'members')) { + $aAttrs['rel'] = 'nofollow'; + } + return $aAttrs; } }