From 965caf98a557c729a4591933cd72147d3672f99a Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 29 Dec 2022 21:43:52 +0100 Subject: [PATCH] Replace database "update_" config entries with key-value entries --- src/Module/Admin/DBSync.php | 2 +- update.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Module/Admin/DBSync.php b/src/Module/Admin/DBSync.php index bb1fa90330..3ab9fb799e 100644 --- a/src/Module/Admin/DBSync.php +++ b/src/Module/Admin/DBSync.php @@ -42,7 +42,7 @@ class DBSync extends BaseAdmin switch ($action) { case 'mark': if ($update) { - DI::config()->set('database', 'update_' . $update, 'success'); + DI::keyValue()->set('database_update_' . $update, 'success'); $curr = DI::config()->get('system', 'build'); if (intval($curr) == $update) { DI::config()->set('system', 'build', intval($curr) + 1); diff --git a/update.php b/update.php index 9aaf95193b..2235b04512 100644 --- a/update.php +++ b/update.php @@ -1150,7 +1150,8 @@ function update_1505() { $conditions = [ "((`cat` = ?) AND ((`k` LIKE ?) OR (`k` = ?) OR (`k` LIKE ?) OR (`k` = ?))) OR " . - "((`cat` != ?) AND (`k` LIKE ?))", + "((`cat` != ?) AND (`k` LIKE ?)) OR " . + "((`cat` = ?) AND (`k` LIKE ?))", "system", "post_update_%", "worker_last_cleaned", @@ -1158,6 +1159,8 @@ function update_1505() "worker_daemon_mode", "system", "last_%", + "database", + "update_%", ]; $postUpdateEntries = DBA::selectToArray('config', ['cat', 'k', 'v'], $conditions); -- 2.39.5