From 8e12edc375197e16f87156da941a627c421cd674 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 16 May 2020 10:04:09 +0000 Subject: [PATCH] Improved code --- src/Database/DBStructure.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 352e8b0f8..dcb59fc9f 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -291,13 +291,11 @@ class DBStructure */ public static function update($basePath, $verbose, $action, $install = false, array $tables = null, array $definition = null) { - if (!$install) { + if ($action && !$install) { if (self::isUpdating()) { return DI::l10n()->t('Another database update is currently running.'); } - } - if ($action && !$install) { DI::config()->set('system', 'maintenance', 1); DI::config()->set('system', 'maintenance_reason', DI::l10n()->t('%s: Database update', DateTimeFormat::utcNow() . ' ' . date('e'))); }