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 {
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)
);

View File

@ -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) {