mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Revert build.sql
Make update.php responsive
This commit is contained in:
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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";
|
||||
}
|
||||
|
Reference in New Issue
Block a user