X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ferror.php;h=3162cfe656f30c701a429f1cb6aaec6ded14e8a3;hb=fae0f36b4d1e43e42637bced0b655ee6a25d6226;hp=fc749adfc017db1aec5f57a20b698c7d4dd3faac;hpb=d35b2d3f3c2128b147a6fa897032262c1f632262;p=quix0rs-gnu-social.git diff --git a/lib/error.php b/lib/error.php index fc749adfc0..3162cfe656 100644 --- a/lib/error.php +++ b/lib/error.php @@ -7,8 +7,8 @@ * * @category Action * @package StatusNet - * @author Evan Prodromou - * @author Zach Copley + * @author Evan Prodromou + * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ * @@ -29,7 +29,7 @@ * along with this program. If not, see . */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -38,15 +38,16 @@ if (!defined('LACONICA')) { * * @category Action * @package StatusNet - * @author Zach Copley + * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ 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) @@ -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)