]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/api.php
Merge branch '0.7.x' into 0.8.x
[quix0rs-gnu-social.git] / actions / api.php
index a27d244929f032468cc5ae0e4373a936a8d47c37..d2f0a2eff0f7a47c1038939970d1fe0fd9a2cd32 100644 (file)
@@ -127,13 +127,15 @@ class ApiAction extends Action
                                 'laconica/wadl');
 
         static $bareauth = array('statuses/user_timeline',
+                                 'statuses/friends_timeline',
                                  'statuses/friends',
+                                 'statuses/replies',
                                  'statuses/followers',
                                  '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;
@@ -178,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(
@@ -205,5 +207,4 @@ class ApiAction extends Action
 
         return false;
     }
-
 }