- $config = dba::selectFirst('config', ['v'], ['cat' => $family, 'k' => $key]);
- if (DBM::is_result($config)) {
- // manage array value
- $val = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
-
- // Assign the value from the database to the cache
- self::$cache[$family][$key] = $val;
- self::$in_db[$family][$key] = true;
- return $val;
- } elseif (isset($a->config[$family][$key])) {
- // Assign the value (mostly) from the .htconfig.php to the cache
- self::$cache[$family][$key] = $a->config[$family][$key];
- self::$in_db[$family][$key] = false;
-
- return $a->config[$family][$key];