diff options
-rw-r--r-- | lib/action.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/action.php b/lib/action.php index 81b228312..45d696442 100644 --- a/lib/action.php +++ b/lib/action.php @@ -26,16 +26,16 @@ class Action { // lawsuit function Action() { } - function arg($key) { + function arg($key, $def=NULL) { if (array_key_exists($key, $this->args)) { return $this->args[$key]; } else { - return NULL; + return $def; } } - function trimmed($key) { - $arg = $this->arg($key); + function trimmed($key, $def=NULL) { + $arg = $this->arg($key, $def); return (is_string($arg)) ? trim($arg) : $arg; } |