aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/AbConfig.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-10-23 14:02:19 +0200
committerMario Vavti <mario@mariovavti.com>2022-10-23 14:02:19 +0200
commit8879776d6436ed5257648a1873ddaa9486b25070 (patch)
tree996c192607ed8b1a4b03bd620deb4b1f3b348a48 /Zotlabs/Lib/AbConfig.php
parent5edd13c6bb89c7434d8437f8cc74c038371fdbf8 (diff)
downloadvolse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.tar.gz
volse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.tar.bz2
volse-hubzilla-8879776d6436ed5257648a1873ddaa9486b25070.zip
fix php warnings
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;