Skip to content

Commit

Permalink
✨ 改进更新功能
Browse files Browse the repository at this point in the history
  • Loading branch information
0xxb committed Mar 19, 2020
1 parent bb7ebf1 commit 12bca3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
runtime/.tmp
/public/20*
/application/install.lock
backups
.env

# Icon must end with two \r
Expand Down
5 changes: 5 additions & 0 deletions application/index/controller/admin/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public function upgrade()
$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(); // 获取最新版
// 判断是否已经是最新版
Expand Down
5 changes: 0 additions & 5 deletions extend/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ public function __construct($path, $version)
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();
}

Expand Down

0 comments on commit 12bca3e

Please sign in to comment.