diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-20 20:20:35 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-20 20:20:35 -0700 |
commit | 62df06b3d6b2e56d271b69bebf8427caa715dd16 (patch) | |
tree | 24f269749200e3501d14082e76815640dd98a2d0 /include/items.php | |
parent | 06898167720158604f1c3d1d2e19a591208c607a (diff) | |
download | volse-hubzilla-62df06b3d6b2e56d271b69bebf8427caa715dd16.tar.gz volse-hubzilla-62df06b3d6b2e56d271b69bebf8427caa715dd16.tar.bz2 volse-hubzilla-62df06b3d6b2e56d271b69bebf8427caa715dd16.zip |
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.
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 8 |
1 files changed, 8 insertions, 0 deletions
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']) |