summaryrefslogtreecommitdiff
path: root/inc/display.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-12-23 18:54:24 +0100
committerczaks <marcin@6irc.net>2013-12-23 18:54:24 +0100
commit13dbde96f40f008f76cdf6629e7d0bb5ad2f7580 (patch)
tree3056da47404858509cfeba8d70c8b2d23d6d1e54 /inc/display.php
parent533443ac79358bd6044592ad6ae5b6aa9dbc55f0 (diff)
fix ajax.js errors workings
Diffstat (limited to 'inc/display.php')
-rw-r--r--inc/display.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/display.php b/inc/display.php
index 6f42cdf9..265fd5ef 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -86,7 +86,11 @@ function error($message, $priority = true, $debug_stuff = false) {
}
// Return the bad request header, necessary for AJAX posts
- header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
+ // czaks: is it really so? the ajax errors only work when this is commented out
+ // better yet use it when ajax is disabled
+ if (!isset ($_POST['json_response'])) {
+ header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
+ }
// Is there a reason to disable this?
if (isset($_POST['json_response'])) {