X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigrouplist.php;h=f80fbce932445e04b030220d49a6922ef17f0304;hb=08b430a24736e3bd92c2b8464f825c3ec00f6b79;hp=dd2a68c66e9089fde8f63cc02c526ca05ad8dd4f;hpb=f694f254a452cf44a7bce0d22f2559e0e3f5fd66;p=quix0rs-gnu-social.git diff --git a/actions/apigrouplist.php b/actions/apigrouplist.php index dd2a68c66e..f80fbce932 100644 --- a/actions/apigrouplist.php +++ b/actions/apigrouplist.php @@ -26,6 +26,7 @@ * @author Jeffery To * @author Zach Copley * @copyright 2009 StatusNet, Inc. + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -48,7 +49,6 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ApiGroupListAction extends ApiBareAuthAction { var $groups = null; @@ -59,9 +59,7 @@ class ApiGroupListAction extends ApiBareAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ - function prepare($args) { parent::prepare($args); @@ -87,12 +85,12 @@ class ApiGroupListAction extends ApiBareAuthAction * * @return void */ - function handle($args) { parent::handle($args); $sitename = common_config('site', 'name'); + // TRANS: Used as title in check for group membership. %s is a user name. $title = sprintf(_("%s's groups"), $this->user->nickname); $taguribase = TagURI::base(); $id = "tag:$taguribase:Groups"; @@ -100,10 +98,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: Used as subtitle in check for group membership. %1$s is the site name, %2$s is a user name. + _('%1$s groups %2$s is a member of.'), + $sitename, + $this->user->nickname ); switch($this->format) { @@ -130,13 +130,13 @@ class ApiGroupListAction extends ApiBareAuthAction break; default: $this->clientError( + // TRANS: Client error displayed trying to execute an unknown API method checking group membership. _('API method not found.'), 404, $this->format ); break; } - } /** @@ -144,7 +144,6 @@ class ApiGroupListAction extends ApiBareAuthAction * * @return array groups */ - function getGroups() { $groups = array(); @@ -170,7 +169,6 @@ class ApiGroupListAction extends ApiBareAuthAction * * @return boolean true */ - function isReadOnly($args) { return true; @@ -199,7 +197,6 @@ class ApiGroupListAction extends ApiBareAuthAction * * @return string etag */ - function etag() { if (!empty($this->groups) && (count($this->groups) > 0)) { @@ -209,6 +206,7 @@ class ApiGroupListAction extends ApiBareAuthAction return '"' . implode( ':', array($this->arg('action'), + common_user_cache_hash($this->auth_user), common_language(), $this->user->id, strtotime($this->groups[0]->created), @@ -219,5 +217,4 @@ class ApiGroupListAction extends ApiBareAuthAction return null; } - }