mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-03 07:04:07 +01:00
* [FIX] Skip over initialization when upgrade is needed. Thanks to @Envikia and @alexseys for the notice. Closes #1355
Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -137,11 +137,9 @@ final class Init extends ModuleBase
|
||||
/**
|
||||
* Comprobar si es necesario actualizar componentes
|
||||
*
|
||||
* @throws InitializationException
|
||||
* @throws DependencyException
|
||||
* @throws NotFoundException
|
||||
* @throws EnvironmentIsBrokenException
|
||||
* @throws FileException
|
||||
* @throws InitializationException
|
||||
*/
|
||||
private function checkUpgrade()
|
||||
{
|
||||
|
||||
@@ -185,6 +185,8 @@ final class Init extends ModuleBase
|
||||
$this->router->response()
|
||||
->redirect('index.php?r=install/index')
|
||||
->send();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Checks if the database is set up
|
||||
@@ -194,6 +196,8 @@ final class Init extends ModuleBase
|
||||
$this->router->response()
|
||||
->redirect('index.php?r=error/databaseConnection')
|
||||
->send();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Checks if maintenance mode is turned on
|
||||
@@ -203,6 +207,8 @@ final class Init extends ModuleBase
|
||||
$this->router->response()
|
||||
->redirect('index.php?r=error/maintenanceError')
|
||||
->send();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Checks if upgrade is needed
|
||||
@@ -214,6 +220,8 @@ final class Init extends ModuleBase
|
||||
$this->router->response()
|
||||
->redirect('index.php?r=upgrade/index')
|
||||
->send();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Checks if the database is set up
|
||||
@@ -223,6 +231,8 @@ final class Init extends ModuleBase
|
||||
$this->router->response()
|
||||
->redirect('index.php?r=error/databaseError')
|
||||
->send();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize event handlers
|
||||
|
||||
Reference in New Issue
Block a user