chore: Avoid handlers and database initialization when not yet installed

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2022-06-19 22:33:27 +02:00
parent b0a0170860
commit 8bfff2170f
13 changed files with 123 additions and 911 deletions

View File

@@ -4,7 +4,7 @@
*
* @author nuxsmin
* @link https://syspass.org
* @copyright 2012-2021, Rubén Domínguez nuxsmin@$syspass.org
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
*
* This file is part of sysPass.
*
@@ -64,11 +64,11 @@ abstract class ModuleBase
*/
protected function initEventHandlers(bool $partialInit = false): void
{
if (DEBUG || $this->configData->isDebug()) {
if (DEBUG || $this->configData->isDebug() || !$this->configData->isInstalled()) {
$this->eventDispatcher->attach($this->providersHelper->getFileLogHandler());
}
if ($partialInit) {
if ($partialInit || !$this->configData->isInstalled()) {
return;
}