2) Refactor App->config[] into Core\PConfig
authorPhilipp Holzer <admin@philipp.info>
Sun, 3 Feb 2019 18:05:44 +0000 (19:05 +0100)
committerPhilipp Holzer <admin@philipp.info>
Sun, 3 Feb 2019 18:05:44 +0000 (19:05 +0100)
src/Core/Config/JITPConfigAdapter.php
src/Core/PConfig.php

index 4992068..ac9a560 100644 (file)
@@ -28,7 +28,7 @@ class JITPConfigAdapter implements IPConfigAdapter
                        }
                } else if ($cat != 'config') {
                        // Negative caching
-                       PConfig::setPConfigValue($uid, $cat, "!<unset>!");
+                       PConfig::setPConfigValue($uid, $cat, null, "!<unset>!");
                }
                DBA::close($pconfigs);
        }
index 7104ce8..75403aa 100644 (file)
@@ -203,7 +203,11 @@ class PConfig extends BaseObject
                        self::$config[$uid][$cat] = [];
                }
 
-               self::$config[$uid][$cat][$k] = $value;
+               if ($k === null) {
+                       self::$config[$uid][$cat] = $value;
+               } else {
+                       self::$config[$uid][$cat][$k] = $value;
+               }
        }
 
        /**