* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
-}
-
-require_once INSTALLDIR . '/lib/error.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Class for displaying HTTP client errors
{
parent::__construct($message, $code);
$this->default = 400;
- }
-
- // XXX: Should these error actions even be invokable via URI?
-
- protected function handle()
- {
- parent::handle();
-
- $this->code = $this->trimmed('code');
- if (!$this->code || $code < 400 || $code > 499) {
+ if (!$this->code || $this->code < 400 || $this->code > 499) {
$this->code = $this->default;
}
-
- $this->message = $this->trimmed('message');
-
if (!$this->message) {
$this->message = "Client Error $this->code";
}
-
- $this->showPage();
}
/**