From: Philipp Date: Thu, 29 Dec 2022 22:38:14 +0000 (+0100) Subject: Fixup maintenance mode X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f96aec18cc4110394bcc1959fabd1a90f5fc93cc;p=friendica.git Fixup maintenance mode --- diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 734046afba..7de6799cfd 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -176,14 +176,14 @@ class DBStructure public static function performUpdate(bool $enable_maintenance_mode = true, bool $verbose = false): string { if ($enable_maintenance_mode) { - DI::keyValue()->set('maintenance', 1); + DI::config()->set('system', 'maintenance', 1); } $status = self::update($verbose, true); if ($enable_maintenance_mode) { - DI::keyValue()->set('maintenance', 0); - DI::keyValue()->set('maintenance_reason', ''); + DI::config()->set('system', 'maintenance', 0); + DI::config()->set('system', 'maintenance_reason', ''); } return $status; @@ -213,7 +213,7 @@ class DBStructure */ private static function update(bool $verbose, bool $action, bool $install = false, array $tables = null, array $definition = null): string { - $in_maintenance_mode = DI::keyValue()->get('system', 'maintenance'); + $in_maintenance_mode = DI::config()->get('system', 'maintenance'); if ($action && !$install && self::isUpdating()) { return DI::l10n()->t('Another database update is currently running.');