* [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:
Rubén D
2019-07-20 20:51:28 +02:00
parent 1adb103f29
commit b5559b52eb
2 changed files with 11 additions and 3 deletions

View File

@@ -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()
{

View File

@@ -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