]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/error.php
Revert "Remove more contractions"
[quix0rs-gnu-social.git] / lib / error.php
index e7bba8a47ba1381bcf56eddd48eec62cca7f82f3..3162cfe656f30c701a429f1cb6aaec6ded14e8a3 100644 (file)
@@ -29,7 +29,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('STATUSNET')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -44,9 +44,10 @@ 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)
@@ -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)