From: Michael Date: Sat, 16 May 2020 10:04:09 +0000 (+0000) Subject: Improved code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8e12edc375197e16f87156da941a627c421cd674;p=friendica.git Improved code --- diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 352e8b0f87..dcb59fc9f2 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'))); }