]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/api.php
Ticket 1404. Showing the link to the members list page.
[quix0rs-gnu-social.git] / actions / api.php
index c18d551b6d487151286e011c65f1f534ee8afd2c..d2f0a2eff0f7a47c1038939970d1fe0fd9a2cd32 100644 (file)
@@ -134,8 +134,8 @@ class ApiAction extends Action
                                  'favorites/favorites');
 
         $fullname = "$this->api_action/$this->api_method";
-        
-        // If the site is "private", all API methods except laconica/config 
+
+        // If the site is "private", all API methods except laconica/config
         // need authentication
         if (common_config('site', 'private')) {
             return $fullname != 'laconica/config' || false;
@@ -180,11 +180,11 @@ class ApiAction extends Action
         }
     }
 
-    function isReadOnly()
+    function isReadOnly($args)
     {
-        # NOTE: before handle(), can't use $this->arg
-        $apiaction = $_REQUEST['apiaction'];
-        $method = $_REQUEST['method'];
+        $apiaction = $args['apiaction'];
+        $method = $args['method'];
+
         list($cmdtext, $fmt) = explode('.', $method);
 
         static $write_methods = array(
@@ -207,5 +207,4 @@ class ApiAction extends Action
 
         return false;
     }
-
 }