Revert build.sql

Make update.php responsive
This commit is contained in:
f0o
2015-09-01 23:31:41 +01:00
parent 3f7c37a523
commit 2fd423f9fc
4 changed files with 16 additions and 447 deletions

View File

@@ -52,7 +52,8 @@ while (!feof($sql_fh)) {
}
fclose($sql_fh);
dbInsert(array('version' => 67), 'dbSchema');
require 'includes/sql-schema/update.php';
if( isset($_SESSION['stage']) ) {
$_SESSION['build-ok'] = true;

448
build.sql

File diff suppressed because one or more lines are too long

View File

@@ -10,7 +10,6 @@ $stage = $_POST['stage'];
// Before we do anything, if we see config.php, redirect back to the homepage.
if(file_exists('../config.php') && $stage != "6") {
session_destroy();
header("Location: /");
exit;
}
@@ -76,6 +75,7 @@ elseif($stage == "4") {
}
}
elseif($stage == "6") {
session_destroy();
// If we get here then let's do some final checks.
if(!file_exists("../config.php")) {
// config.php file doesn't exist. go back to that stage

View File

@@ -94,6 +94,16 @@ if ($tmp[0] <= $db_rev) {
foreach ($filelist as $file) {
list($filename,$extension) = explode('.', $file, 2);
if ($filename > $db_rev) {
if (isset($_SESSION['stage']) ) {
$limit++;
if ( abs($limit-$_REQUEST['offset']) > 6) {
$_SESSION['offset'] = $limit;
echo '<b>Updating, please wait..</b><sub>'.date('r').'</sub><script>window.location.href = "install.php?offset='.$limit.'";</script>';
die();
}
}
if (!$updating) {
echo "-- Updating database schema\n";
}