diff options
author | Sarven Capadisli <csarven@controlyourself.ca> | 2009-04-14 19:14:39 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@controlyourself.ca> | 2009-04-14 19:14:39 +0000 |
commit | 0b3bd63a30fa9d47e5bf7e63e58b74ceffe36049 (patch) | |
tree | 70dc38865639b0d8a88d8b342e8677ce8caf952f /actions/api.php | |
parent | 4c29cda000b4598cdf33d1ae81a53da06051a505 (diff) | |
parent | 41b247ac1ac1f7752f5449d772307d78a6102964 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Diffstat (limited to 'actions/api.php')
-rw-r--r-- | actions/api.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/actions/api.php b/actions/api.php index c18d551b6..d2f0a2eff 100644 --- a/actions/api.php +++ b/actions/api.php @@ -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; } - } |