From 81e4cd8c450d7df7c03a1b735415befc89a735a0 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Thu, 27 Dec 2012 23:00:14 -0800 Subject: [PATCH] Flush output buffer immediately so update messages are displayed as the script executes --- imgboard.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/imgboard.php b/imgboard.php index 875402a..116fb0d 100644 --- a/imgboard.php +++ b/imgboard.php @@ -6,6 +6,8 @@ error_reporting(E_ALL); ini_set("display_errors", 1); session_start(); +ob_implicit_flush(); +ob_end_flush(); if (get_magic_quotes_gpc()) { foreach ($_GET as $key => $val) { $_GET[$key] = stripslashes($val); } @@ -150,8 +152,10 @@ if (isset($_POST['message']) || isset($_POST['file'])) { if (strtolower($post['email']) == 'noko') { $redirect = 'res/' . ($post['parent'] == TINYIB_NEWTHREAD ? $post['id'] : $post['parent']) . '.html#' . $post['id']; } + trimThreads(); - echo 'Updating thread page...
'; + + echo 'Updating thread...
'; if ($post['parent'] != TINYIB_NEWTHREAD) { rebuildThread($post['parent']); @@ -162,7 +166,7 @@ if (isset($_POST['message']) || isset($_POST['file'])) { rebuildThread($post['id']); } - echo 'Updating thread index...
'; + echo 'Updating index...
'; rebuildIndexes(); // Check if the request is to delete a post and/or its associated image } elseif (isset($_GET['delete']) && !isset($_GET['manage'])) {