let abconfig specify a family

This commit is contained in:
redmatrix 2016-07-13 20:17:40 -07:00
parent f60a0c5ce0
commit 00afe56cad
2 changed files with 6 additions and 4 deletions

View File

@ -5,8 +5,10 @@ namespace Zotlabs\Lib;
class AbConfig { class AbConfig {
static public function Load($chan,$xhash) { static public function Load($chan,$xhash,$family = '') {
$r = q("select * from abconfig where chan = %d and xchan = '%s'", if($family)
$where = sprintf(" and family = '%s' ",dbesc($family));
$r = q("select * from abconfig where chan = %d and xchan = '%s' $where",
intval($chan), intval($chan),
dbesc($xhash) dbesc($xhash)
); );

View File

@ -98,8 +98,8 @@ function del_aconfig($account_id, $family, $key) {
} }
function load_abconfig($chan,$xhash) { function load_abconfig($chan, $xhash, $family = '') {
Zlib\AbConfig::Load($chan,$xhash); return Zlib\AbConfig::Load($chan,$xhash,$family);
} }
function get_abconfig($chan,$xhash,$family,$key) { function get_abconfig($chan,$xhash,$family,$key) {