mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 11:14:32 +02:00
Introduce ConfigFileManager for config files
This commit is contained in:
parent
fea4b202c1
commit
0f91d1cbde
21 changed files with 343 additions and 302 deletions
19
update.php
19
update.php
|
@ -1175,3 +1175,22 @@ function update_1505()
|
|||
|
||||
return DBA::delete('config', $conditions) ? Update::SUCCESS : Update::FAILED;
|
||||
}
|
||||
|
||||
function update_1508()
|
||||
{
|
||||
$categories = DBA::toArray(DBA::p("SELECT DISTINCT `cat` AS 'cat' FROM `config`"));
|
||||
|
||||
foreach ($categories as $category) {
|
||||
DI::config()->load($category['cat']);
|
||||
}
|
||||
|
||||
$config = DBA::selectToArray('config');
|
||||
|
||||
foreach ($config as $entry) {
|
||||
DI::config()->set($entry['cat'], $entry['k'], $entry['v'], false);
|
||||
}
|
||||
|
||||
DI::config()->save();
|
||||
|
||||
DBA::e("DELETE FROM `config`");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue