summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorzach <zach@copley.name>2008-07-22 13:15:01 -0400
committerzach <zach@copley.name>2008-07-22 13:15:01 -0400
commit038f762bce95323ac929b0635cceb7f9425527ec (patch)
tree9013c417f21e50cf77b53cafe707322367666441 /lib
parent80facfa16dfdab11135e6e79f5cea916ca0b0959 (diff)
Added is_readonly() method to all Actions
darcs-hash:20080722171501-ca946-160bad6c4f80be2b3b105ea9b913f1c0f9edb0ef.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php6
-rw-r--r--lib/settingsaction.php4
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/action.php b/lib/action.php
index 5f4526166..1dca596eb 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -26,6 +26,10 @@ class Action { // lawsuit
function Action() {
}
+ function is_readonly() {
+ return true;
+ }
+
function arg($key, $def=NULL) {
if (array_key_exists($key, $this->args)) {
return $this->args[$key];
@@ -55,7 +59,7 @@ class Action { // lawsuit
} else {
return $def;
}
- }
+ }
function server_error($msg, $code=500) {
$action = $this->trimmed('action');
diff --git a/lib/settingsaction.php b/lib/settingsaction.php
index a71c9e9bc..0e39a7459 100644
--- a/lib/settingsaction.php
+++ b/lib/settingsaction.php
@@ -21,6 +21,10 @@ if (!defined('LACONICA')) { exit(1); }
class SettingsAction extends Action {
+ function is_readonly() {
+ return false;
+ }
+
function handle($args) {
parent::handle($args);
if (!common_logged_in()) {