diff options
author | Evan Prodromou <evan@status.net> | 2009-09-29 17:43:45 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-09-29 17:57:55 -0400 |
commit | b0ce2add41877091ba750b36387b45a476127526 (patch) | |
tree | 56ddc979d3932b5d07433e8813f58b9e32601d1e /lib/servererroraction.php | |
parent | 4312ea90aa46299bfd77454e441f9ecb867fadd1 (diff) |
move HTTP error code strings to class variables
Diffstat (limited to 'lib/servererroraction.php')
-rw-r--r-- | lib/servererroraction.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/servererroraction.php b/lib/servererroraction.php index c6400605e..0993a63bc 100644 --- a/lib/servererroraction.php +++ b/lib/servererroraction.php @@ -55,17 +55,17 @@ require_once INSTALLDIR.'/lib/error.php'; class ServerErrorAction extends ErrorAction { + static $status = array(500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported'); + function __construct($message='Error', $code=500) { parent::__construct($message, $code); - $this->status = array(500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported'); - $this->default = 500; // Server errors must be logged. @@ -93,9 +93,4 @@ class ServerErrorAction extends ErrorAction $this->showPage(); } - - function title() - { - return $this->status[$this->code]; - } } |