aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/AbConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/AbConfig.php')
-rw-r--r--Zotlabs/Lib/AbConfig.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/Zotlabs/Lib/AbConfig.php b/Zotlabs/Lib/AbConfig.php
index dfc9efc6c..af1786966 100644
--- a/Zotlabs/Lib/AbConfig.php
+++ b/Zotlabs/Lib/AbConfig.php
@@ -6,12 +6,17 @@ namespace Zotlabs\Lib;
class AbConfig {
static public function Load($chan,$xhash,$family = '') {
- if($family)
+ $where = '';
+
+ if($family) {
$where = sprintf(" and cat = '%s' ",dbesc($family));
+ }
+
$r = q("select * from abconfig where chan = %d and xchan = '%s' $where",
intval($chan),
dbesc($xhash)
);
+
return $r;
}
@@ -21,7 +26,7 @@ class AbConfig {
intval($chan),
dbesc($xhash),
dbesc($family),
- dbesc($key)
+ dbesc($key)
);
if($r) {
return ((preg_match('|^a:[0-9]+:{.*}$|s', $r[0]['v'])) ? unserialize($r[0]['v']) : $r[0]['v']);
@@ -41,19 +46,19 @@ class AbConfig {
dbesc($xhash),
dbesc($family),
dbesc($key),
- dbesc($dbvalue)
+ dbesc($dbvalue)
);
}
else {
$r = q("update abconfig set v = '%s' where chan = %d and xchan = '%s' and cat = '%s' and k = '%s' ",
- dbesc($dbvalue),
+ dbesc($dbvalue),
dbesc($chan),
dbesc($xhash),
dbesc($family),
dbesc($key)
);
}
-
+
if($r)
return $value;
return false;