X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fservererroraction.php;h=0993a63bca506149dcecddf892b6d264d4b1cd8e;hb=1fd91de82c0be74ae2305f1412b1cd1b2948dfbc;hp=9ed3832a68323aa4c84ef0b6dc230b5e031d624c;hpb=c5cf2c4c94794a1aeea32a427ddd50e157fa893d;p=quix0rs-gnu-social.git diff --git a/lib/servererroraction.php b/lib/servererroraction.php index 9ed3832a68..0993a63bca 100644 --- a/lib/servererroraction.php +++ b/lib/servererroraction.php @@ -29,7 +29,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -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]; - } }