aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php9
1 files 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');
}