X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ferror.php;h=87a4d913b41b1287f7af821926c5a8dea82a8439;hb=91760ae2ae677c68fa818e98e35525f07ded3fd8;hp=e7bba8a47ba1381bcf56eddd48eec62cca7f82f3;hpb=865b716f0919b6e5133133cd6be53f4143660324;p=quix0rs-gnu-social.git diff --git a/lib/error.php b/lib/error.php index e7bba8a47b..87a4d913b4 100644 --- a/lib/error.php +++ b/lib/error.php @@ -29,7 +29,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -44,12 +44,13 @@ if (!defined('STATUSNET')) { */ class ErrorAction extends Action { + static $status = array(); + var $code = null; var $message = null; - var $status = null; var $default = null; - function __construct($message, $code, $output='php://output', $indent=true) + function __construct($message, $code, $output='php://output', $indent=null) { parent::__construct($output, $indent); @@ -69,7 +70,7 @@ class ErrorAction extends Action */ function extraHeaders() { - $status_string = $this->status[$this->code]; + $status_string = @self::$status[$this->code]; header('HTTP/1.1 '.$this->code.' '.$status_string); } @@ -88,9 +89,10 @@ class ErrorAction extends Action * * @return page title */ + function title() { - return $this->message; + return @self::$status[$this->code]; } function isReadOnly($args)