* Modify unlink file.

This commit is contained in:
caoyanyi
2023-04-18 14:28:12 +08:00
parent eceeb4bd04
commit 2f962c8f2e
+9 -6
View File
@@ -296,14 +296,17 @@ class install extends control
*/
public function step6()
{
$canDelFile = is_writable($this->app->getAppRoot() . 'www');
$installFileDeleted = $canDelFile ? unlink($this->app->getAppRoot() . 'www/install.php') : false;
$canDelFile = is_writable($this->app->getAppRoot() . 'www');
$installFile = $this->app->getAppRoot() . 'www/install.php';
$upgradeFile = $this->app->getAppRoot() . 'www/upgrade.php';
$installFileDeleted = $canDelFile && is_writable($installFile) ? unlink($installFile) : false;
if($canDelFile and is_writable($upgradeFile)) unlink($upgradeFile);
unset($_SESSION['installing']);
session_destroy();
$this->view->installFileDeleted = $installFileDeleted;
$this->view->title = $this->lang->install->success;
$this->display();
if($canDelFile) unlink($this->app->getAppRoot() . 'www/upgrade.php');
unset($_SESSION['installing']);
session_destroy();
}
}