From 501cf5a6ef15ad92745f47c512744b199cda263c Mon Sep 17 00:00:00 2001 From: f0o Date: Wed, 2 Sep 2015 00:13:14 +0100 Subject: [PATCH] Present all output+errors at the end --- build-base.php | 2 +- html/install.php | 11 ++++++++--- includes/sql-schema/update.php | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build-base.php b/build-base.php index 56860774ed..1abbe7642d 100644 --- a/build-base.php +++ b/build-base.php @@ -36,7 +36,7 @@ while (!feof($sql_fh)) { } elseif ( abs($limit-$_REQUEST['offset']) > 6) { $_SESSION['offset'] = $limit; - echo 'Installing, please wait..'.date('r').''; + $GLOBALS['refresh'] = 'Installing, please wait..'.date('r').''; return; } else { echo 'Step #'.$limit.' ...'.PHP_EOL; diff --git a/html/install.php b/html/install.php index b3775d2a8c..bec581e350 100644 --- a/html/install.php +++ b/html/install.php @@ -309,7 +309,6 @@ elseif($stage == "2") {
Importing MySQL DB - Do not close this page or interrupt the import
-
 ".$_SESSION['out']."
"; ?> -
diff --git a/includes/sql-schema/update.php b/includes/sql-schema/update.php index 7bbe7fc3ba..837794abf2 100644 --- a/includes/sql-schema/update.php +++ b/includes/sql-schema/update.php @@ -91,6 +91,7 @@ if ($tmp[0] <= $db_rev) { return; } +$limit = @$limit?: $_REQUEST['offset']; foreach ($filelist as $file) { list($filename,$extension) = explode('.', $file, 2); if ($filename > $db_rev) { @@ -99,7 +100,7 @@ foreach ($filelist as $file) { $limit++; if ( abs($limit-$_REQUEST['offset']) > 6) { $_SESSION['offset'] = $limit; - echo 'Updating, please wait..'.date('r').''; + $GLOBALS['refresh'] = 'Updating, please wait..'.date('r').''; return; } }