diff options
| author | czaks <marcin@6irc.net> | 2016-05-15 15:52:41 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-15 15:53:30 +0200 |
| commit | 52fe9bc873e2950606afefad82cd102ad0a4db5c (patch) | |
| tree | 7170404ad8d6cc0275ec828db65e05e55416e207 /inc | |
| parent | 4fe2da2fcdae3203d72a31fad75780c256ccc02c (diff) | |
fix sane_strategy for advanced build. should fix the ajax.js problem.
Diffstat (limited to 'inc')
| -rwxr-xr-x | inc/functions.php | 8 |
1 files 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; } |
