Merge remote-tracking branch 'upstream/develop' into move-delivery
This commit is contained in:
commit
4eceb2d26f
37 changed files with 712 additions and 132 deletions
32
update.php
32
update.php
|
@ -982,7 +982,7 @@ function update_1429()
|
|||
return Update::FAILED;
|
||||
}
|
||||
|
||||
DI::config()->set('system', 'post_update_version', 1423);
|
||||
DI::keyValue()->set('post_update_version', 1423);
|
||||
|
||||
return Update::SUCCESS;
|
||||
}
|
||||
|
@ -1145,3 +1145,33 @@ function update_1502()
|
|||
DBA::e("UPDATE `pconfig` SET `cat` = 'calendar' WHERE `k` = 'first_day_of_week'");
|
||||
return Update::SUCCESS;
|
||||
}
|
||||
|
||||
function update_1505()
|
||||
{
|
||||
$conditions = [
|
||||
"((`cat` = ?) AND ((`k` LIKE ?) OR (`k` = ?) OR (`k` LIKE ?) OR (`k` = ?))) OR " .
|
||||
"((`cat` != ?) AND (`k` LIKE ?)) OR " .
|
||||
"((`cat` = ?) AND (`k` LIKE ?))",
|
||||
"system",
|
||||
"post_update_%",
|
||||
"worker_last_cleaned",
|
||||
"last%",
|
||||
"worker_daemon_mode",
|
||||
"system",
|
||||
"last_%",
|
||||
"database",
|
||||
"update_%",
|
||||
];
|
||||
|
||||
$postUpdateEntries = DBA::selectToArray('config', ['cat', 'k', 'v'], $conditions);
|
||||
|
||||
foreach ($postUpdateEntries as $postUpdateEntry) {
|
||||
if ($postUpdateEntry['cat'] === 'system') {
|
||||
DI::keyValue()->set($postUpdateEntry['k'], $postUpdateEntry['v']);
|
||||
} else {
|
||||
DI::keyValue()->set(sprintf('%s_%s', $postUpdateEntry['cat'], $postUpdateEntry['k']), $postUpdateEntry['v']);
|
||||
}
|
||||
}
|
||||
|
||||
return DBA::delete('config', $conditions) ? Update::SUCCESS : Update::FAILED;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue