This commit is contained in:
wangyidong
2022-08-09 10:52:08 +08:00
parent c5f539cf28
commit 402d439ee0
3 changed files with 14 additions and 10 deletions
+6 -3
View File
@@ -930,7 +930,7 @@ class upgrade extends control
}
$nextTable = $stmt->fetch();
if(stripos($nextTable->Name, 'searchindex') !== false)
if($nextTable and stripos($nextTable->Name, 'searchindex') !== false)
{
$mysqlVersion = $this->loadModel('install')->getMysqlVersion();
if($mysqlVersion < 5.6) return print(json_encode($response));
@@ -941,8 +941,11 @@ class upgrade extends control
$tableName = $table->Name;
$response['table'] = $tableName;
$response['next'] = $nextTable->Name;
if($response['next']) $response['nextMessage'] = sprintf($this->lang->upgrade->changingTable, $response['next']);
if($nextTable)
{
$response['next'] = $nextTable->Name;
if($response['next']) $response['nextMessage'] = sprintf($this->lang->upgrade->changingTable, $response['next']);
}
if(stripos($tableName, 'searchindex') !== false)
{
+1 -1
View File
@@ -3212,7 +3212,7 @@ class upgradeModel extends model
}
$openVersion = $this->getOpenVersion($fromVersion);
if(version_compare($open, '17_4', '<=')) $needProcess['changeEngine'] = true;
if(version_compare($openVersion, '17_4', '<=')) $needProcess['changeEngine'] = true;
return $needProcess;
}
+7 -6
View File
@@ -91,12 +91,13 @@ function finishedShow()
<?php if(isset($needProcess['changeEngine'])):?>
$(function()
{
$('.col-md-6:first').append("<div id='changeEngineBox' class='alert alert-info'><p><?php echo $lang->upgrade->changeEngine;?></p></div>");
$('.col-md-6:first').append("<div id='changeEngineBox' class='alert alert-info'><p><?php echo $lang->upgrade->changeEngine;?></p><div class='info'></div></div>");
changeEngine();
})
function changeEngine()
{
var link = '<?php echo inlink('ajaxChangeTableEngine')?>';
var link = '<?php echo inlink('ajaxChangeTableEngine')?>';
var $infoBox = $('#changeEngineBox .info');
$.getJSON(link, function(response)
{
if(response == null)
@@ -107,14 +108,14 @@ function changeEngine()
else if(response.result == 'finished')
{
changeEngineFinish = true;
$('#changeEngineBox').prepend("<div class='text-success'>" + response.message + "</div>");
$infoBox.prepend("<div class='text-success'>" + response.message + "</div>");
finishedShow();
}
else
{
if($('#changeEngineBox').find('.' + response.table).length == 0) $('#changeEngineBox').prepend("<div class='text-success " + response.table + "'></div>");
$('#changeEngineBox').find('.' + response.table).html(response.message);
if(response.next) $('#changeEngineBox').prepend("<div class='text-success " + response.next + "'>" + response.nextMessage + "</div>");
if($infoBox.find('.' + response.table).length == 0) $infoBox.prepend("<div class='text-success " + response.table + "'></div>");
$infoBox.find('.' + response.table).html(response.message);
if(response.next) $infoBox.prepend("<div class='text-success " + response.next + "'>" + response.nextMessage + "</div>");
changeEngine();
}
});