diff options
author | redmatrix <git@macgirvin.com> | 2016-07-13 20:17:40 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-13 20:17:40 -0700 |
commit | 00afe56cadbf72bd76efceb0663291d7f88a93fc (patch) | |
tree | b2dd8a898b9650d06bc79550d5bfc63b31336b7f | |
parent | f60a0c5ce050febb0b200938eb51d88cf563b88f (diff) | |
download | volse-hubzilla-00afe56cadbf72bd76efceb0663291d7f88a93fc.tar.gz volse-hubzilla-00afe56cadbf72bd76efceb0663291d7f88a93fc.tar.bz2 volse-hubzilla-00afe56cadbf72bd76efceb0663291d7f88a93fc.zip |
let abconfig specify a family
-rw-r--r-- | Zotlabs/Lib/AbConfig.php | 6 | ||||
-rw-r--r-- | include/config.php | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Zotlabs/Lib/AbConfig.php b/Zotlabs/Lib/AbConfig.php index 138d0dfea..cab59abbd 100644 --- a/Zotlabs/Lib/AbConfig.php +++ b/Zotlabs/Lib/AbConfig.php @@ -5,8 +5,10 @@ namespace Zotlabs\Lib; class AbConfig { - static public function Load($chan,$xhash) { - $r = q("select * from abconfig where chan = %d and xchan = '%s'", + static public function Load($chan,$xhash,$family = '') { + if($family) + $where = sprintf(" and family = '%s' ",dbesc($family)); + $r = q("select * from abconfig where chan = %d and xchan = '%s' $where", intval($chan), dbesc($xhash) ); diff --git a/include/config.php b/include/config.php index ece22793f..08810e298 100644 --- a/include/config.php +++ b/include/config.php @@ -98,8 +98,8 @@ function del_aconfig($account_id, $family, $key) { } -function load_abconfig($chan,$xhash) { - Zlib\AbConfig::Load($chan,$xhash); +function load_abconfig($chan, $xhash, $family = '') { + return Zlib\AbConfig::Load($chan,$xhash,$family); } function get_abconfig($chan,$xhash,$family,$key) { |