summaryrefslogtreecommitdiff
path: root/actions/api.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-19 11:55:26 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-19 11:55:26 -0400
commit0c271c9d17b5d15efc6a935bf3e2b76ce309968e (patch)
tree6f0f75070508a2d56b8149a37563b52b2a462ebb /actions/api.php
parenta218bec9828f8e358f774d8e426c12a32346b92a (diff)
try again with user_timeline auth
darcs-hash:20080719155526-84dde-5157cd11d2f96128321b46cb2bea8ff27ce4478f.gz
Diffstat (limited to 'actions/api.php')
-rw-r--r--actions/api.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/actions/api.php b/actions/api.php
index 97da359fe..1cfae9114 100644
--- a/actions/api.php
+++ b/actions/api.php
@@ -105,9 +105,18 @@ class ApiAction extends Action {
'statuses/show',
'help/test',
'help/downtime_schedule');
- if (in_array("$this->api_action/$this->api_method", $noauth)) {
+ static $bareauth = array('statuses/user_timeline');
+
+ # noauth: never needs auth
+ # bareauth: only needs auth if without an argument
+
+ $fullname = "$this->api_action/$this->api_method";
+
+ if (in_array($fullname, $bareauth) && !$this->api_arg) {
+ return true;
+ } if (in_array($fullname, $noauth)) {
return false;
- }
+ }
return true;
}