diff options
author | CiaranG <ciaran@ciarang.com> | 2009-03-05 16:18:59 +0000 |
---|---|---|
committer | CiaranG <ciaran@ciarang.com> | 2009-03-05 16:18:59 +0000 |
commit | 3c53e821cc545d14807c9197d07e8686028a846d (patch) | |
tree | e51f35dc8783ea2ba3c9443d28a55a707330909a /lib/clienterroraction.php | |
parent | e5345d8d7a5b519cfb24c9e2a971b485b3c1c872 (diff) | |
parent | ea0c5f565c9ca4b34c1071a51333f0f842a954b9 (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.php | 15 |
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]; + } } |