- $ret = dba::select('config', array('v'), array('cat' => $family, 'k' => $key), array('limit' => 1));
- if (DBM::is_result($ret)) {
- // manage array value
- $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['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];