]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apigroupshow.php
Merge branch 'master' of gitorious.org:statusnet/mainline into testing
[quix0rs-gnu-social.git] / actions / apigroupshow.php
index 733c9ccfe68faa8e26d3cd8c51e9ce0659e713a5..95d6f95afa8a18be770d5d8a0d00225563638d16 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/twitterapi.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,13 +96,13 @@ 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);
+            $this->clientError(_('API method not found.'), 404, $this->format);
             break;
         }
 
@@ -145,4 +149,19 @@ class ApiGroupShowAction extends TwitterApiAction
         return null;
     }
 
+    /**
+     * Return true if read only.
+     *
+     * MAY override
+     *
+     * @param array $args other arguments
+     *
+     * @return boolean is read only action?
+     */
+
+    function isReadOnly($args)
+    {
+        return true;
+    }
+
 }