aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-13 01:42:08 -0800
committerfriendica <info@friendica.com>2012-11-13 01:42:08 -0800
commit9bfff0bca1c827330b05ea973b785bcabb9dbb4e (patch)
tree0053ccd051422a705cbf83d29e6268ed1ddc0d14 /include/zot.php
parent5bf3ddfcf66ece4b50d5fccfd90c49005ce768ce (diff)
downloadvolse-hubzilla-9bfff0bca1c827330b05ea973b785bcabb9dbb4e.tar.gz
volse-hubzilla-9bfff0bca1c827330b05ea973b785bcabb9dbb4e.tar.bz2
volse-hubzilla-9bfff0bca1c827330b05ea973b785bcabb9dbb4e.zip
ensure we update the correct abook record
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');
}