diff --git a/module/install/control.php b/module/install/control.php index 450b308cdf..b550680de9 100644 --- a/module/install/control.php +++ b/module/install/control.php @@ -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(); } }