aboutsummaryrefslogtreecommitdiffstats
path: root/include/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/config.php')
-rw-r--r--include/config.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/config.php b/include/config.php
index df1070c13..1f2a70e5a 100644
--- a/include/config.php
+++ b/include/config.php
@@ -18,19 +18,17 @@
if(! function_exists('load_config')) {
function load_config($family) {
global $a;
- $r = q("SELECT * FROM `config` WHERE `cat` = '%s'",
- dbesc($family)
- );
+ $r = q("SELECT * FROM `config` WHERE `cat` = '%s'", dbesc($family));
if(count($r)) {
foreach($r as $rr) {
$k = $rr['k'];
- if ($rr['cat'] === 'config') {
+ if ($family === 'config') {
$a->config[$k] = $rr['v'];
} else {
$a->config[$family][$k] = $rr['v'];
}
}
- } else if ($rr['cat'] != 'config') {
+ } else if ($family != 'config') {
// Negative caching
$a->config[$family] = "!<unset>!";
}
@@ -128,7 +126,7 @@ function load_pconfig($uid,$family) {
$k = $rr['k'];
$a->config[$uid][$family][$k] = $rr['v'];
}
- } else if ($rr['cat'] != 'config') {
+ } else if ($family != 'config') {
// Negative caching
$a->config[$uid][$family] = "!<unset>!";
}