- // To-Do: How to integrate APC here?
-
- $r = q("SELECT * FROM `config` WHERE `cat` = '%s'", dbesc($family));
+ $r = q("SELECT `v`, `k` FROM `config` WHERE `cat` = '%s'", dbesc($family));
if (apc_exists($family."|".$key)) {
$val = apc_fetch($family."|".$key);
$a->config[$family][$key] = $val;
if (apc_exists($family."|".$key)) {
$val = apc_fetch($family."|".$key);
$a->config[$family][$key] = $val;
$a->config[$family][$key] = $val;
// If APC is enabled then store the data there, else try XCache
$a->config[$family][$key] = $val;
// If APC is enabled then store the data there, else try XCache
apc_store($family."|".$key, $val, 600);
elseif (function_exists("xcache_set"))
apc_store($family."|".$key, $val, 600);
elseif (function_exists("xcache_set"))
$a->config[$family][$key] = '!<unset>!';
// If APC is enabled then store the data there, else try XCache
$a->config[$family][$key] = '!<unset>!';
// If APC is enabled then store the data there, else try XCache
apc_store($family."|".$key, '!<unset>!', 600);
elseif (function_exists("xcache_set"))
apc_store($family."|".$key, '!<unset>!', 600);
elseif (function_exists("xcache_set"))
$a->config[$family][$key] = $value;
// If APC is enabled then store the data there, else try XCache
$a->config[$family][$key] = $value;
// If APC is enabled then store the data there, else try XCache
apc_store($family."|".$key, $value, 600);
elseif (function_exists("xcache_set"))
apc_store($family."|".$key, $value, 600);
elseif (function_exists("xcache_set"))
if(! function_exists('load_pconfig')) {
function load_pconfig($uid,$family) {
global $a;
if(! function_exists('load_pconfig')) {
function load_pconfig($uid,$family) {
global $a;
if (apc_exists($uid."|".$family."|".$key)) {
$val = apc_fetch($uid."|".$family."|".$key);
$a->config[$uid][$family][$key] = $val;
if (apc_exists($uid."|".$family."|".$key)) {
$val = apc_fetch($uid."|".$family."|".$key);
$a->config[$uid][$family][$key] = $val;
$a->config[$uid][$family][$key] = $val;
// If APC is enabled then store the data there, else try XCache
$a->config[$uid][$family][$key] = $val;
// If APC is enabled then store the data there, else try XCache
apc_store($uid."|".$family."|".$key, $val, 600);
elseif (function_exists("xcache_set"))
apc_store($uid."|".$family."|".$key, $val, 600);
elseif (function_exists("xcache_set"))
$a->config[$uid][$family][$key] = '!<unset>!';
// If APC is enabled then store the data there, else try XCache
$a->config[$uid][$family][$key] = '!<unset>!';
// If APC is enabled then store the data there, else try XCache
apc_store($uid."|".$family."|".$key, '!<unset>!', 600);
elseif (function_exists("xcache_set"))
apc_store($uid."|".$family."|".$key, '!<unset>!', 600);
elseif (function_exists("xcache_set"))
$a->config[$uid][$family][$key] = $value;
// If APC is enabled then store the data there, else try XCache
$a->config[$uid][$family][$key] = $value;
// If APC is enabled then store the data there, else try XCache
apc_store($uid."|".$family."|".$key, $value, 600);
elseif (function_exists("xcache_set"))
apc_store($uid."|".$family."|".$key, $value, 600);
elseif (function_exists("xcache_set"))