start working on the singleton setting

This commit is contained in:
redmatrix
2015-12-09 18:30:30 -08:00
parent 93123e1fa8
commit 72edc9cd6c
5 changed files with 35 additions and 7 deletions

View File

@@ -1883,3 +1883,16 @@ function check_channelallowed($hash) {
return $retvalue;
}
function deliverable_singleton($xchan) {
$r = q("select abook_instance from abook where abook_xchan = '%s' limit 1",
dbesc($xchan['xchan_hash'])
);
if($r) {
if(! $r[0]['abook_instance'])
return true;
if(strpos($r[0]['abook_instance'],z_root()) !== false)
return true;
}
return false;
}