mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-09 04:19:32 +08:00
update
This commit is contained in:
parent
884820af10
commit
715200c88d
@ -39,7 +39,7 @@ class Base extends Controller
|
||||
|
||||
// 检测程序是否已安装
|
||||
if (!file_exists(Env::get('config_path') . 'db.php')) {
|
||||
return $this->redirect(url('/install'));
|
||||
$this->redirect(url('/install'));
|
||||
}
|
||||
|
||||
$configs = \app\common\model\Config::all();
|
||||
@ -60,7 +60,7 @@ class Base extends Controller
|
||||
// 检测数据库结构更新
|
||||
if ($this->user && $this->user->is_admin) {
|
||||
if (file_exists(Env::get('root_path') . 'update.sql')) {
|
||||
return $this->redirect(url('/install/update'));
|
||||
$this->redirect(url('/install/update'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,6 +150,9 @@ EOT;
|
||||
Session::flash('install_success', true);
|
||||
// 删除sql文件
|
||||
@unlink($rootPath . 'install.sql');
|
||||
if (file_exists($rootPath . 'update.sql')) {
|
||||
@unlink($rootPath . 'update.sql');
|
||||
}
|
||||
// 删除session
|
||||
Session::delete('db');
|
||||
return $this->success('设置成功');
|
||||
|
Loading…
Reference in New Issue
Block a user