X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigrouplist.php;h=3ea2c30cbb8e55e11522ee036745d4a8df76b801;hb=f8883367184e4fd31dc819d5e1257d0eee11eb10;hp=98fdb0497a3c3bb5e59194d254d25d04abc0e901;hpb=c89ed16d24d56879bf40a70d500509d1d42a4532;p=quix0rs-gnu-social.git diff --git a/actions/apigrouplist.php b/actions/apigrouplist.php index 98fdb0497a..3ea2c30cbb 100644 --- a/actions/apigrouplist.php +++ b/actions/apigrouplist.php @@ -66,7 +66,13 @@ class ApiGroupListAction extends ApiBareAuthAction { parent::prepare($args); - $this->user = $this->getTargetUser($id); + $this->user = $this->getTargetUser(null); + + if (empty($this->user)) { + $this->clientError(_('No such user.'), 404, $this->format); + return false; + } + $this->groups = $this->getGroups(); return true; @@ -86,12 +92,8 @@ class ApiGroupListAction extends ApiBareAuthAction { parent::handle($args); - if (empty($this->user)) { - $this->clientError(_('No such user.'), 404, $this->format); - return; - } - $sitename = common_config('site', 'name'); + // TRANS: %s is a user name $title = sprintf(_("%s's groups"), $this->user->nickname); $taguribase = TagURI::base(); $id = "tag:$taguribase:Groups"; @@ -99,10 +101,12 @@ class ApiGroupListAction extends ApiBareAuthAction 'usergroups', array('nickname' => $this->user->nickname) ); + $subtitle = sprintf( - _("Groups %1$s is a member of on %2$s."), - $this->user->nickname, - $sitename + // TRANS: Meant to convey the user %2$s is a member of each of the groups listed on site %1$s + _("%1\$s groups %2\$s is a member of."), + $sitename, + $this->user->nickname ); switch($this->format) {