X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ferror.php;h=87a4d913b41b1287f7af821926c5a8dea82a8439;hb=8e07926a9c0736b5a3f408465dded92676ac1862;hp=410a9da3f883ce8aa15cddae623b52c9ea33a215;hpb=c8b8f07af14ad2ce9d0c0267962dd3bbf6473a4b;p=quix0rs-gnu-social.git diff --git a/lib/error.php b/lib/error.php index 410a9da3f8..87a4d913b4 100644 --- a/lib/error.php +++ b/lib/error.php @@ -7,12 +7,12 @@ * * @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://laconi.ca/ + * @link http://status.net/ * - * StatusNet - a distributed open-source microblogging tool + * StatusNet - the distributed open-source microblogging tool * Copyright (C) 2008, 2009, StatusNet, Inc. * * This program is free software: you can redistribute it and/or modify @@ -29,7 +29,7 @@ * along with this program. If not, see . */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -38,18 +38,19 @@ 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://laconi.ca/ + * @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) + 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)