don't send sync packets to deleted hubloc locations

This commit is contained in:
redmatrix 2015-09-22 19:13:10 -07:00
parent 15feeb7bfe
commit d16ac62a51

View File

@ -2802,8 +2802,10 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
$channel = $r[0];
$h = q("select * from hubloc where hubloc_hash = '%s'",
dbesc($channel['channel_hash'])
$h = q("select * from hubloc where hubloc_hash = '%s' and not (hubloc_flags & %d) > 0 and not (hubloc_status & %d) > 0",
dbesc($channel['channel_hash']),
intval(HUBLOC_FLAGS_DELETED),
intval(HUBLOC_OFFLINE)
);
if(! $h)