From 52fe9bc873e2950606afefad82cd102ad0a4db5c Mon Sep 17 00:00:00 2001 From: czaks Date: Sun, 15 May 2016 15:52:41 +0200 Subject: [PATCH] fix sane_strategy for advanced build. should fix the ajax.js problem. --- inc/functions.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 35be56b9..154386b0 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -2843,12 +2843,10 @@ function strategy_smart_build($fun, $array) { } function strategy_sane($fun, $array) { global $config; - // Well, ideally a sane strategy would involve a more stringent checking, - // but let's at least have something to get the ball rolling :^) - if (php_sapi_name() == 'cli') return false; - else if (isset($_POST['mod']) || isset($_POST['json_response'])) return false; - else if ($fun == 'sb_thread' || ($fun == 'sb_board' && $array[1] == 1)) return array('immediate'); + else if (isset($_POST['mod'])) return false; + // Thread needs to be done instantly. Same with a board page, but only if posting a new thread. + else if ($fun == 'sb_thread' || ($fun == 'sb_board' && $array[1] == 1 && isset ($_POST['page']))) return array('immediate'); else return false; }