mirror of
https://github.com/friendica/friendica
synced 2025-04-25 11:10:11 +00:00
Preload Adapter Fix
This commit is contained in:
parent
a3152a96c2
commit
2fc81898da
5 changed files with 36 additions and 14 deletions
|
@ -36,11 +36,12 @@ class ConfigCache implements IConfigCache, IPConfigCache
|
|||
$keys = array_keys($config[$category]);
|
||||
|
||||
foreach ($keys as $key) {
|
||||
if (isset($config[$category][$key])) {
|
||||
$value = $config[$category][$key];
|
||||
if (isset($value) && $value !== '!<unset>!') {
|
||||
if ($overwrite) {
|
||||
$this->set($category, $key, $config[$category][$key]);
|
||||
$this->set($category, $key, $value);
|
||||
} else {
|
||||
$this->setDefault($category, $key, $config[$category][$key]);
|
||||
$this->setDefault($category, $key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,9 +133,19 @@ class ConfigCache implements IConfigCache, IPConfigCache
|
|||
*/
|
||||
public function loadP($uid, array $config)
|
||||
{
|
||||
foreach ($config as $category => $values) {
|
||||
foreach ($values as $key => $value) {
|
||||
$this->setP($uid, $category, $key, $value);
|
||||
$categories = array_keys($config);
|
||||
|
||||
foreach ($categories as $category) {
|
||||
if (isset($config[$category]) && is_array($config[$category])) {
|
||||
|
||||
$keys = array_keys($config[$category]);
|
||||
|
||||
foreach ($keys as $key) {
|
||||
$value = $config[$category][$key];
|
||||
if (isset($value) && $value !== '!<unset>!') {
|
||||
$this->setP($uid, $category, $key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue