summaryrefslogtreecommitdiff
path: root/lib/clienterroraction.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-10-06 19:06:57 -0700
committerZach Copley <zach@status.net>2010-10-06 19:06:57 -0700
commitf71912440a17f468b1d60db2388fc6030631fce6 (patch)
treefda6f213af813df4f563773c7e5a25ab4b377187 /lib/clienterroraction.php
parent5d5c4e8344ba8a16b7da36977693a3eec912880b (diff)
- New base InfoAction for dialog box like msgs
- Fix titles on error pages
Diffstat (limited to 'lib/clienterroraction.php')
-rw-r--r--lib/clienterroraction.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/clienterroraction.php b/lib/clienterroraction.php
index 08bced5bd..9233c9bde 100644
--- a/lib/clienterroraction.php
+++ b/lib/clienterroraction.php
@@ -12,7 +12,7 @@
* @link http://status.net/
*
* StatusNet - the distributed open-source microblogging tool
- * Copyright (C) 2008, 2009, StatusNet, Inc.
+ * Copyright (C) 2008-2010 StatusNet, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -32,7 +32,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
-require_once INSTALLDIR.'/lib/error.php';
+require_once INSTALLDIR . '/lib/error.php';
/**
* Class for displaying HTTP client errors
@@ -90,4 +90,26 @@ class ClientErrorAction extends ErrorAction
$this->showPage();
}
+
+ /**
+ * To specify additional HTTP headers for the action
+ *
+ * @return void
+ */
+ function extraHeaders()
+ {
+ $status_string = @self::$status[$this->code];
+ header('HTTP/1.1 '.$this->code.' '.$status_string);
+ }
+
+ /**
+ * Page title.
+ *
+ * @return page title
+ */
+
+ function title()
+ {
+ return @self::$status[$this->code];
+ }
}