]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/clienterroraction.php
change controlyourself.ca to status.net
[quix0rs-gnu-social.git] / lib / clienterroraction.php
index ef6fd51dffc16f3dc5b4df82743c9bd460842a06..cd7d85221ef231f904bc88ebb71b692634a76730 100644 (file)
@@ -6,14 +6,14 @@
  * PHP version 5
  *
  * @category Action
- * @package  Laconica
- * @author   Evan Prodromou <evan@controlyourself.ca>
- * @author   Zach Copley <zach@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  *
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * 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
  * it under the terms of the GNU Affero General Public License as published by
@@ -39,17 +39,17 @@ require_once INSTALLDIR.'/lib/error.php';
  * Class for displaying HTTP client errors
  *
  * @category Action
- * @package  Laconica
- * @author   Zach Copley <zach@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  */
 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];
+    }
 }