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.

This commit is contained in:
redmatrix
2015-05-20 20:20:35 -07:00
parent 0689816772
commit 62df06b3d6
2 changed files with 13 additions and 16 deletions

View File

@@ -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'])