From 7e6870db914d4e905fc7ae833b69404fd3ea0d3d Mon Sep 17 00:00:00 2001 From: zach Date: Tue, 22 Jul 2008 17:20:56 -0400 Subject: base class is_readonly() now returns false by default darcs-hash:20080722212056-ca946-e4bd9eef8e3d8991414932e9fc7b8c9a31f818c0.gz --- actions/twitapifavorites.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actions/twitapifavorites.php') 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); -- cgit v1.2.3-54-g00ecf