diff --git a/module/backup/control.php b/module/backup/control.php index 59d292f368..4f9ef5aaf1 100644 --- a/module/backup/control.php +++ b/module/backup/control.php @@ -303,16 +303,16 @@ class backup extends control if($attachFileName) { $log = $this->backup->getBackupDirProgress($attachFileName); - if(empty($log)) return print(''); $message = sprintf($this->lang->backup->progressAttach, zget($log, 'allCount', 0), zget($log, 'count', 0)); + if(empty($log)) $message = ''; } $codeFileName = $this->backup->getBackupFile($fileName, 'code'); if($codeFileName) { $log = $this->backup->getBackupDirProgress($codeFileName); - if(empty($log)) return print(''); $message = sprintf($this->lang->backup->progressCode, zget($log, 'allCount', 0), zget($log, 'count', 0)); + if(empty($log)) $message = ''; } return print($message); diff --git a/module/backup/js/index.ui.js b/module/backup/js/index.ui.js index 313c9cc2e3..1cbcddf1f3 100644 --- a/module/backup/js/index.ui.js +++ b/module/backup/js/index.ui.js @@ -44,19 +44,18 @@ function backupData() { clearInterval(timeID); $('#message').append(data); - setTimeout(function(){return loadPage($.createLink('backup', 'index'));}, 2000); + setTimeout(function(){return loadCurrentPage();}, 2000); }, error: function(request, textstatus, error) { clearInterval(timeID); if(textstatus == 'timeout') $('#message').append("
" + backupTimeout + '
'); - setTimeout(function(){return loadPage($.createLink('backup', 'index'));}, 2000); + setTimeout(function(){return loadCurrentPage();}, 2000); } }); - $('#waitting .modal-body #backupType').html(backup); zui.Modal.open({id: 'waiting', size: 'sm', backdrop: false}); - $('#waitting').addClass('show'); + $('#waiting').addClass('show'); timeID = setInterval(function() { diff --git a/module/backup/model.php b/module/backup/model.php index f700a4386a..ec77bf486d 100644 --- a/module/backup/model.php +++ b/module/backup/model.php @@ -332,7 +332,7 @@ class backupModel extends model $log = json_decode(file_get_contents($tmpLogFile), true); return empty($log) ? array() : $log; } - return array('allCount' => 0, 'count' => 0); + return array(); } /** diff --git a/module/backup/ui/index.html.php b/module/backup/ui/index.html.php index 486a3b8ba3..99cba34cd4 100644 --- a/module/backup/ui/index.html.php +++ b/module/backup/ui/index.html.php @@ -115,19 +115,15 @@ dtable set::footer(array('html' => $lang->backup->restoreTip . sprintf($lang->backup->holdDays, $config->backup->holdDays), 'className' => 'text-important')) ); -modalTrigger +modal ( - set(array('data-size' => 'sm', 'backdrop' => false)), - modal + setID('waiting'), + html($lang->backup->waitting), + set::closeBtn(false), + div ( - setID('waiting'), - html($lang->backup->waitting), - set::closeBtn(false), - div - ( - setID('message'), - html(sprintf($lang->backup->progressSQL, 0)) - ) + setID('message'), + html(sprintf($lang->backup->progressSQL, 0)) ) );