]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/clienterroraction.php
change Controlez-Vous to Control Yourself
[quix0rs-gnu-social.git] / lib / clienterroraction.php
index ef6fd51dffc16f3dc5b4df82743c9bd460842a06..609abb30dc5578fd659c29911d89dbb2cc32d01e 100644 (file)
@@ -13,7 +13,7 @@
  * @link     http://laconi.ca/
  *
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, Control Yourself, 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
@@ -49,7 +49,7 @@ class ClientErrorAction extends ErrorAction
     function __construct($message='Error', $code=400)
     {
         parent::__construct($message, $code);
-        
+
         $this->status  = array(400 => 'Bad Request',
                                401 => 'Unauthorized',
                                402 => 'Payment Required',
@@ -70,9 +70,9 @@ class ClientErrorAction extends ErrorAction
                                417 => 'Expectation Failed');
         $this->default = 400;
     }
-    
+
     // XXX: Should these error actions even be invokable via URI?
-    
+
     function handle($args)
     {
         parent::handle($args);
@@ -84,11 +84,16 @@ class ClientErrorAction extends ErrorAction
         }
 
         $this->message = $this->trimmed('message');
-        
+
         if (!$this->message) {
-            $this->message = "Client Error $this->code"; 
-        }        
+            $this->message = "Client Error $this->code";
+        }
 
         $this->showPage();
     }
+
+    function title()
+    {
+        return $this->status[$this->code];
+    }
 }