2022.09-rc
Michael Vogel 2013-08-12 11:14:02 +02:00
rodzic e75f88d7fe
commit 694ca8fc57
1 zmienionych plików z 1 dodań i 7 usunięć

Wyświetl plik

@ -70,7 +70,6 @@ function get_config($family, $key, $instore = false) {
if (function_exists("apc_fetch") AND function_exists("apc_exists")) if (function_exists("apc_fetch") AND function_exists("apc_exists"))
if (apc_exists($family."|".$key)) { if (apc_exists($family."|".$key)) {
$val = apc_fetch($family."|".$key); $val = apc_fetch($family."|".$key);
//logger("APC: fetched stored value ".$family."|".$key, LOGGER_DEBUG);
$a->config[$family][$key] = $val; $a->config[$family][$key] = $val;
if ($val === '!<unset>!') if ($val === '!<unset>!')
@ -78,9 +77,6 @@ function get_config($family, $key, $instore = false) {
else else
return $val; return $val;
} }
// else
//logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
$ret = q("SELECT `v` FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1", $ret = q("SELECT `v` FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1",
dbesc($family), dbesc($family),
@ -201,15 +197,13 @@ function get_pconfig($uid,$family, $key, $instore = false) {
if (function_exists("apc_fetch") AND function_exists("apc_exists")) if (function_exists("apc_fetch") AND function_exists("apc_exists"))
if (apc_exists($uid."|".$family."|".$key)) { if (apc_exists($uid."|".$family."|".$key)) {
$val = apc_fetch($uid."|".$family."|".$key); $val = apc_fetch($uid."|".$family."|".$key);
//logger("APC: fetched stored value ".$uid."|".$family."|".$key, LOGGER_DEBUG);
$a->config[$uid][$family][$key] = $val; $a->config[$uid][$family][$key] = $val;
if ($val === '!<unset>!') if ($val === '!<unset>!')
return false; return false;
else else
return $val; return $val;
} // else }
//logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
$ret = q("SELECT `v` FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s' LIMIT 1", $ret = q("SELECT `v` FROM `pconfig` WHERE `uid` = %d AND `cat` = '%s' AND `k` = '%s' LIMIT 1",