mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Present all output+errors at the end
This commit is contained in:
@@ -36,7 +36,7 @@ while (!feof($sql_fh)) {
|
||||
}
|
||||
elseif ( abs($limit-$_REQUEST['offset']) > 6) {
|
||||
$_SESSION['offset'] = $limit;
|
||||
echo '<b>Installing, please wait..</b><sub>'.date('r').'</sub><script>window.location.href = "install.php?offset='.$limit.'";</script>';
|
||||
$GLOBALS['refresh'] = '<b>Installing, please wait..</b><sub>'.date('r').'</sub><script>window.location.href = "install.php?offset='.$limit.'";</script>';
|
||||
return;
|
||||
} else {
|
||||
echo 'Step #'.$limit.' ...'.PHP_EOL;
|
||||
|
@@ -309,7 +309,6 @@ elseif($stage == "2") {
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h5 class="text-center">Importing MySQL DB - Do not close this page or interrupt the import</h5>
|
||||
<pre>
|
||||
<?php
|
||||
// Ok now let's set the db connection up
|
||||
$config['db_host']=$dbhost;
|
||||
@@ -318,14 +317,20 @@ elseif($stage == "2") {
|
||||
$config['db_name']=$dbname;
|
||||
$config['db']['extension']='mysqli';
|
||||
$sql_file = '../build.sql';
|
||||
if ($_REQUEST['offset'] <= 100) {
|
||||
ob_end_flush();
|
||||
ob_start();
|
||||
if ($_SESSION['offset'] < 100 && $_REQUEST['offset'] < 94) {
|
||||
require '../build-base.php';
|
||||
}
|
||||
else {
|
||||
require '../includes/sql-schema/update.php';
|
||||
}
|
||||
$_SESSION['out'] .= ob_get_clean().PHP_EOL;
|
||||
ob_end_clean();
|
||||
ob_start();
|
||||
echo $GLOBALS['refresh'];
|
||||
echo "<pre>".$_SESSION['out']."</pre>";
|
||||
?>
|
||||
</pre>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
|
@@ -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 '<b>Updating, please wait..</b><sub>'.date('r').'</sub><script>window.location.href = "install.php?offset='.$limit.'";</script>';
|
||||
$GLOBALS['refresh'] = '<b>Updating, please wait..</b><sub>'.date('r').'</sub><script>window.location.href = "install.php?offset='.$limit.'";</script>';
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user