]> git.mxchange.org Git - friendica.git/commitdiff
Replace database "update_" config entries with key-value entries
authorPhilipp <admin@philipp.info>
Thu, 29 Dec 2022 20:43:52 +0000 (21:43 +0100)
committerPhilipp <admin@philipp.info>
Thu, 29 Dec 2022 20:53:58 +0000 (21:53 +0100)
src/Module/Admin/DBSync.php
update.php

index bb1fa903305552b7aa3af6c8a01d95e9b6abcf83..3ab9fb799ea9424a87b0cb25561122f58b192e3e 100644 (file)
@@ -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);
index 9aaf95193be26165befb87fe48d5e9af690ac33c..2235b04512f40d13b0d2022f2215cc9a2e67de1d 100644 (file)
@@ -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);