]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apigroupshow.php
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / actions / apigroupshow.php
index a38d50afe7fb801b26222581d3eb1c1e0d38b51b..aae4d249c3e8ecb9cd80ee416b55288091425afb 100644 (file)
@@ -21,6 +21,9 @@
  *
  * @category  API
  * @package   StatusNet
+ * @author    Craig Andrews <candrews@integralblue.com>
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Jeffery To <jeffery.to@gmail.com>
  * @author    Zach Copley <zach@status.net>
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
@@ -31,21 +34,23 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/api.php';
+require_once INSTALLDIR . '/lib/apiprivateauth.php';
 
 /**
  * Outputs detailed information about the group specified by ID
  *
  * @category API
  * @package  StatusNet
+ * @author   Craig Andrews <candrews@integralblue.com>
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Jeffery To <jeffery.to@gmail.com>
  * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
 
-class ApiGroupShowAction extends TwitterApiAction
+class ApiGroupShowAction extends ApiPrivateAuthAction
 {
-    var $format = null;
     var $group = null;
 
     /**
@@ -61,7 +66,6 @@ class ApiGroupShowAction extends TwitterApiAction
     {
         parent::prepare($args);
 
-        $this->format = $this->arg('format');
         $this->group = $this->getTargetGroup($this->arg('id'));
 
         return true;
@@ -83,7 +87,7 @@ class ApiGroupShowAction extends TwitterApiAction
 
         if (empty($this->group)) {
             $this->clientError(
-                'Group not found!',
+                _('Group not found!'),
                 404,
                 $this->format
             );
@@ -92,10 +96,10 @@ class ApiGroupShowAction extends TwitterApiAction
 
         switch($this->format) {
         case 'xml':
-            $this->show_single_xml_group($this->group);
+            $this->showSingleXmlGroup($this->group);
             break;
         case 'json':
-            $this->show_single_json_group($this->group);
+            $this->showSingleJsonGroup($this->group);
             break;
         default:
             $this->clientError(_('API method not found!'), 404, $this->format);