summaryrefslogtreecommitdiff
path: root/actions/twitapidirect_messages.php
diff options
context:
space:
mode:
authorzach <zach@copley.name>2008-07-22 17:20:56 -0400
committerzach <zach@copley.name>2008-07-22 17:20:56 -0400
commit7e6870db914d4e905fc7ae833b69404fd3ea0d3d (patch)
treed7af767a8733ae3b7731fc178076351b06cf7198 /actions/twitapidirect_messages.php
parent877eb138c4a793cb065e9575e4f31469caf86b36 (diff)
base class is_readonly() now returns false by default
darcs-hash:20080722212056-ca946-e4bd9eef8e3d8991414932e9fc7b8c9a31f818c0.gz
Diffstat (limited to 'actions/twitapidirect_messages.php')
-rw-r--r--actions/twitapidirect_messages.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/actions/twitapidirect_messages.php b/actions/twitapidirect_messages.php
index e7f3e1266..9a84082e6 100644
--- a/actions/twitapidirect_messages.php
+++ b/actions/twitapidirect_messages.php
@@ -23,6 +23,21 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
class Twitapidirect_messagesAction extends TwitterapiAction {
+
+ function is_readonly() {
+
+ static $write_methods = array( 'direct_messages',
+ 'sent');
+
+ $cmdtext = explode('.', $this->arg('method'));
+
+ if (in_array($cmdtext[0], $write_methods)) {
+ return false;
+ }
+
+ return true;
+ }
+
function direct_messages($args, $apidata) {
parent::handle($args);
common_server_error("API method under construction.", $code=501);