summaryrefslogtreecommitdiff
path: root/lib/clienterroraction.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-03-04 16:21:37 -0800
committerZach Copley <zach@controlyourself.ca>2009-03-04 16:21:37 -0800
commit77e4fad9fac63151c3eee0c3c785c8cf2fa356fb (patch)
tree9803f20b702a6233d67bd201166268f9780e5e4e /lib/clienterroraction.php
parent36bb33fb1d7b4befe2fb68c2eef0712619359293 (diff)
parente239a5529abc0958c4f874811ff704f1e5d6ba62 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'lib/clienterroraction.php')
-rw-r--r--lib/clienterroraction.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/clienterroraction.php b/lib/clienterroraction.php
index 5019dc06d..0c48414d5 100644
--- a/lib/clienterroraction.php
+++ b/lib/clienterroraction.php
@@ -49,7 +49,7 @@ class ClientErrorAction extends ErrorAction
function __construct($message='Error', $code=400)
{
parent::__construct($message, $code);
-
+
$this->status = array(400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
@@ -72,7 +72,7 @@ class ClientErrorAction extends ErrorAction
}
// XXX: Should these error actions even be invokable via URI?
-
+
function handle($args)
{
parent::handle($args);
@@ -84,11 +84,16 @@ class ClientErrorAction extends ErrorAction
}
$this->message = $this->trimmed('message');
-
+
if (!$this->message) {
- $this->message = "Client Error $this->code";
- }
+ $this->message = "Client Error $this->code";
+ }
$this->showPage();
}
+
+ function title()
+ {
+ return $this->status[$this->code];
+ }
}