diff options
author | zach <zach@copley.name> | 2008-07-22 17:20:56 -0400 |
---|---|---|
committer | zach <zach@copley.name> | 2008-07-22 17:20:56 -0400 |
commit | 7e6870db914d4e905fc7ae833b69404fd3ea0d3d (patch) | |
tree | d7af767a8733ae3b7731fc178076351b06cf7198 /actions/twitapifavorites.php | |
parent | 877eb138c4a793cb065e9575e4f31469caf86b36 (diff) |
base class is_readonly() now returns false by default
darcs-hash:20080722212056-ca946-e4bd9eef8e3d8991414932e9fc7b8c9a31f818c0.gz
Diffstat (limited to 'actions/twitapifavorites.php')
-rw-r--r-- | actions/twitapifavorites.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actions/twitapifavorites.php b/actions/twitapifavorites.php index a4afa732a..4de567603 100644 --- a/actions/twitapifavorites.php +++ b/actions/twitapifavorites.php @@ -23,6 +23,19 @@ require_once(INSTALLDIR.'/lib/twitterapi.php'); class TwitapifavoritesAction extends TwitterapiAction { + function is_readonly() { + + static $write_methods = array('favorites'); + + $cmdtext = explode('.', $this->arg('method')); + + if (in_array($cmdtext[0], $write_methods)) { + return false; + } + + return true; + } + function favorites($args, $apidata) { parent::handle($args); common_server_error("API method under construction.", $code=501); |