mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 11:54:31 +02:00
Replace cron/worker "last" config entries with key-value entries
This commit is contained in:
parent
10f8631cd9
commit
6b3265742a
6 changed files with 25 additions and 17 deletions
12
update.php
12
update.php
|
@ -1148,11 +1148,19 @@ function update_1502()
|
|||
|
||||
function update_1505()
|
||||
{
|
||||
$postUpdateEntries = DBA::selectToArray('config', ['k', 'v'], ["`k` LIKE ?", "post_update_%"]);
|
||||
$conditions = [
|
||||
"(`k` LIKE ?) OR (`k` = ?) OR (`cat` = ? AND `k` LIKE ?)",
|
||||
"post_update_%",
|
||||
"worker_last_cleaned",
|
||||
"system",
|
||||
"last%"
|
||||
];
|
||||
|
||||
$postUpdateEntries = DBA::selectToArray('config', ['k', 'v'], $conditions);
|
||||
|
||||
foreach ($postUpdateEntries as $postUpdateEntry) {
|
||||
DI::keyValue()->set($postUpdateEntry['k'], $postUpdateEntry['v']);
|
||||
}
|
||||
|
||||
return DBA::delete('config', ["`k` LIKE ?", "post_update_%"]) ? Update::SUCCESS : Update::FAILED;
|
||||
return DBA::delete('config', $conditions) ? Update::SUCCESS : Update::FAILED;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue