From 62df06b3d6b2e56d271b69bebf8427caa715dd16 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 20 May 2015 20:20:35 -0700 Subject: cloning abook entries was broken in several ways if the target xchan wasn't available on the clone site. This should make it less broken. --- include/items.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index d0b647a92..3936f1a6f 100755 --- a/include/items.php +++ b/include/items.php @@ -971,6 +971,14 @@ function import_author_diaspora($x) { if(! $x['address']) return false; + $r = q("select * from xchan where xchan_addr = '%s' limit 1", + dbesc($x['address']) + ); + if($r) { + logger('in_cache: ' . $x['address'], LOGGER_DATA); + return $r[0]['chan_hash']; + } + if(discover_by_webbie($x['address'])) { $r = q("select xchan_hash from xchan where xchan_addr = '%s' limit 1", dbesc($x['address']) -- cgit v1.2.3