X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigrouplistall.php;h=51c3df1b2f7e128cc8ee7d2f8bfe647f16288c7a;hb=7150c54a3f437043eac95d57ac9fc0672adef564;hp=bd05fa3ea880712a1c1061af5d7039d0730bbbd4;hpb=f789928942c5753d1109ef9609449e79564fda4e;p=quix0rs-gnu-social.git diff --git a/actions/apigrouplistall.php b/actions/apigrouplistall.php index bd05fa3ea8..51c3df1b2f 100644 --- a/actions/apigrouplistall.php +++ b/actions/apigrouplistall.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/apiprivateauth.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 ApiGroupListAllAction extends ApiPrivateAuthAction { var $groups = null; @@ -59,9 +59,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ - function prepare($args) { parent::prepare($args); @@ -81,17 +79,17 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return void */ - function handle($args) { parent::handle($args); $sitename = common_config('site', 'name'); - // TRANS: Message is used as a title. %s is a site name. + // TRANS: Message is used as a title when listing the lastest 20 groups. %s is a site name. $title = sprintf(_("%s groups"), $sitename); $taguribase = TagURI::base(); $id = "tag:$taguribase:Groups"; $link = common_local_url('groups'); + // TRANS: Message is used as a subtitle when listing the latest 20 groups. %s is a site name. $subtitle = sprintf(_("groups on %s"), $sitename); switch($this->format) { @@ -118,13 +116,13 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction break; default: $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format ); break; } - } /** @@ -132,7 +130,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return array groups */ - function getGroups() { $qry = 'SELECT user_group.* '. @@ -164,7 +161,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return boolean true */ - function isReadOnly($args) { return true; @@ -175,7 +171,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return string datestamp of the site's latest group */ - function lastModified() { if (!empty($this->groups) && (count($this->groups) > 0)) { @@ -193,7 +188,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return string etag */ - function etag() { if (!empty($this->groups) && (count($this->groups) > 0)) { @@ -203,6 +197,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction return '"' . implode( ':', array($this->arg('action'), + common_user_cache_hash($this->auth_user), common_language(), strtotime($this->groups[0]->created), strtotime($this->groups[$last]->created)) @@ -212,5 +207,4 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction return null; } - }