summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
authorMike Cochrane <mikec@mikenz.geek.nz>2008-07-09 18:46:30 -0400
committerMike Cochrane <mikec@mikenz.geek.nz>2008-07-09 18:46:30 -0400
commit4b656f47dff2bd6eed4dcfad060b8434d052d883 (patch)
tree6acc353a739f712ecbca9d825dcb7fa16f429ff1 /lib/action.php
parent67921b1c1871e881f71f8f15aa7fc9c2b11da64d (diff)
Merge conflicts and kill a whole lot of trailing whitespace on lines.
darcs-hash:20080709224630-533db-b5399baef280133858dac9b89c2cd6a2aba9f861.gz
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/action.php b/lib/action.php
index 79c924b5e..b36312e40 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -38,14 +38,14 @@ class Action { // lawsuit
$arg = $this->arg($key, $def);
return (is_string($arg)) ? trim($arg) : $arg;
}
-
+
function handle($argarray) {
$this->args =& common_copy_args($argarray);
}
-
+
function boolean($key, $def=false) {
$arg = strtolower($this->trimmed($key));
-
+
if (is_null($arg)) {
return $def;
} else if (in_array($arg, array('true', 'yes', '1'))) {
@@ -56,19 +56,19 @@ class Action { // lawsuit
return $def;
}
}
-
+
function server_error($msg, $code=500) {
$action = $this->trimmed('action');
common_debug("Server error '$code' on '$action': $msg", __FILE__);
common_server_error($msg, $code);
}
-
+
function client_error($msg, $code=400) {
$action = $this->trimmed('action');
common_debug("User error '$code' on '$action': $msg", __FILE__);
common_user_error($msg, $code);
}
-
+
function self_url() {
$action = $this->trimmed('action');
$args = $this->args;