From 9bfff0bca1c827330b05ea973b785bcabb9dbb4e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Nov 2012 01:42:08 -0800 Subject: ensure we update the correct abook record --- include/zot.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/zot.php b/include/zot.php index b11961861..97edb9e1b 100644 --- a/include/zot.php +++ b/include/zot.php @@ -213,11 +213,14 @@ function zot_refresh($them,$channel = null) { } $r = q("update abook set abook_their_perms = %d - where abook_xchan = '%s' and abook_channel = %d limit 1", + where abook_xchan = '%s' and abook_channel = %d + and not (abook_flags & %d) limit 1", intval($their_perms), - dbesc($channel['channel_hash']), - intval($channel['channel_id']) + dbesc($x['hash']), + intval($channel['channel_id']), + intval(ABOOK_FLAG_SELF) ); + if(! $r) logger('abook update failed'); } -- cgit v1.2.3