改进更新功能

This commit is contained in:
WispX 2020-03-19 11:36:10 +08:00
parent bb7ebf1e81
commit 12bca3ec43
3 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@
runtime/.tmp
/public/20*
/application/install.lock
backups
.env
# Icon must end with two \r

View File

@ -95,6 +95,11 @@ class System extends Base
$upgrade = null;
try {
ignore_user_abort(true);
set_time_limit(0);
ini_set('max_execution_time', 0);
ini_set('memory_limit', '256M');
$upgrade = new \Upgrade(app()->getRootPath(), $this->getConfig('system_version'));
$release = $upgrade->release(); // 获取最新版
// 判断是否已经是最新版

View File

@ -52,11 +52,6 @@ class Upgrade
throw new \Exception('无法继续执行, 请确保 ZipArchive 正确安装');
}
ignore_user_abort(true);
set_time_limit(0);
ini_set('max_execution_time', 0);
ini_set('memory_limit', '256M');
ob_clean();
}