diff options
author | Sarven Capadisli <csarven@status.net> | 2010-02-10 11:09:03 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2010-02-10 11:09:03 +0000 |
commit | 3d0bc1a3dd16826bf89286f37aa3778e93a34b6b (patch) | |
tree | 917cbd6dde0d9b47497def39e9dcf12e5433e544 /lib/error.php | |
parent | f3c2dfacf4b3b1ce44edcb82d8e76e75e2b7c9fa (diff) | |
parent | e8428d1d525677fa116236735a43e7b49e8a3fd3 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/error.php')
-rw-r--r-- | lib/error.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/error.php b/lib/error.php index 87a4d913b..a6a29119f 100644 --- a/lib/error.php +++ b/lib/error.php @@ -56,6 +56,7 @@ class ErrorAction extends Action $this->code = $code; $this->message = $message; + $this->minimal = StatusNet::isApi(); // XXX: hack alert: usually we aren't going to // call this page directly, but because it's @@ -102,7 +103,14 @@ class ErrorAction extends Action function showPage() { - parent::showPage(); + if ($this->minimal) { + // Even more minimal -- we're in a machine API + // and don't want to flood the output. + $this->extraHeaders(); + $this->showContent(); + } else { + parent::showPage(); + } // We don't want to have any more output after this exit(); |