move HTTP error code strings to class variables

This commit is contained in:
Evan Prodromou
2009-09-29 17:43:45 -04:00
parent 4312ea90aa
commit b0ce2add41
3 changed files with 30 additions and 38 deletions

View File

@@ -44,9 +44,10 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/
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)
@@ -88,9 +89,10 @@ class ErrorAction extends Action
*
* @return page title
*/
function title()
{
return $this->message;
return self::$status[$this->code];
}
function isReadOnly($args)