X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapigrouplistall.php;h=6d7000e6b85f841e1be72bb5d8686863a4daf9f2;hb=5ba995730cdf9da8c32f5d8697964c00e67e38d4;hp=cc7cd901dcfe052c1307e20c061a3a6205758b92;hpb=64cdbe6c5578df1dc49d8e3dd72451ab0ac96bd2;p=quix0rs-gnu-social.git diff --git a/actions/apigrouplistall.php b/actions/apigrouplistall.php index cc7cd901dc..6d7000e6b8 100644 --- a/actions/apigrouplistall.php +++ b/actions/apigrouplistall.php @@ -35,8 +35,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiprivateauth.php'; - /** * Returns of the lastest 20 groups for the site * @@ -49,7 +47,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; @@ -60,10 +57,8 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ - - function prepare($args) + function prepare(array $args=array()) { parent::prepare($args); @@ -82,17 +77,17 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return void */ - - function handle($args) + function handle(array $args=array()) { 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) { @@ -119,13 +114,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; } - } /** @@ -133,7 +128,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return array groups */ - function getGroups() { $qry = 'SELECT user_group.* '. @@ -165,8 +159,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return boolean true */ - - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; } @@ -176,7 +169,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return string datestamp of the site's latest group */ - function lastModified() { if (!empty($this->groups) && (count($this->groups) > 0)) { @@ -194,7 +186,6 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction * * @return string etag */ - function etag() { if (!empty($this->groups) && (count($this->groups) > 0)) { @@ -214,5 +205,4 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction return null; } - }