diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-31 12:48:24 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-31 12:48:24 -0700 |
commit | df9eb4164aec6d63869dee7bfd5cfddf6d831618 (patch) | |
tree | c078b097143772da34a6660039e79e470f86325a /actions/apigrouplist.php | |
parent | 89bb05311685d1bab404300e600f61deb954e18c (diff) | |
parent | 3ed88938b95804ecadc62ed3a5f61a0863e2ff78 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions/apigrouplist.php')
-rw-r--r-- | actions/apigrouplist.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/actions/apigrouplist.php b/actions/apigrouplist.php index 98fdb0497..dd2a68c66 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,11 +92,6 @@ 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'); $title = sprintf(_("%s's groups"), $this->user->nickname); $taguribase = TagURI::base(); @@ -100,7 +101,7 @@ class ApiGroupListAction extends ApiBareAuthAction array('nickname' => $this->user->nickname) ); $subtitle = sprintf( - _("Groups %1$s is a member of on %2$s."), + _("Groups %1\$s is a member of on %2\$s."), $this->user->nickname, $sitename ); |