X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fmakeadmin.php;h=f19348648d8700f50b0ef8955419dbd7a0b24ecf;hb=f19b95d9b7daa82e73ca2ebf23ca55712de73107;hp=2dfddebc27dd21cc3eba8110cb5926e8535aceec;hpb=bbb830e14c718c687f0636710a1827c90b11f4cc;p=quix0rs-gnu-social.git diff --git a/actions/makeadmin.php b/actions/makeadmin.php index 2dfddebc27..f19348648d 100644 --- a/actions/makeadmin.php +++ b/actions/makeadmin.php @@ -87,12 +87,13 @@ class MakeadminAction extends Action return false; } $user = common_current_user(); - if (!$user->isAdmin($this->group)) { + if (!$user->isAdmin($this->group) && + !$user->hasRight(Right::MAKEGROUPADMIN)) { $this->clientError(_('Only an admin can make another user an admin.'), 401); return false; } if ($this->profile->isAdmin($this->group)) { - $this->clientError(sprintf(_('%s is already an admin for group "%s".'), + $this->clientError(sprintf(_('%1$s is already an admin for group "%2$s".'), $this->profile->getBestName(), $this->group->getBestName()), 401); @@ -129,7 +130,7 @@ class MakeadminAction extends Action 'profile_id' => $this->profile->id)); if (empty($member)) { - $this->serverError(_('Can\'t get membership record for %s in group %s'), + $this->serverError(_('Can\'t get membership record for %1$s in group %2$s.'), $this->profile->getBestName(), $this->group->getBestName()); } @@ -142,7 +143,7 @@ class MakeadminAction extends Action if (!$result) { common_log_db_error($member, 'UPDATE', __FILE__); - $this->serverError(_('Can\'t make %s an admin for group %s'), + $this->serverError(_('Can\'t make %1$s an admin for group %2$s.'), $this->profile->getBestName(), $this->group->getBestName()); }