From 68534fd5dc6fdc879b075c32849d6cbc8a5fc905 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 21 Jun 2015 17:30:23 -0700 Subject: some diaspora import issues uncovered during dry-run tests --- include/Import/import_diaspora.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include/Import/import_diaspora.php') diff --git a/include/Import/import_diaspora.php b/include/Import/import_diaspora.php index f755c39e2..fca9fa4f2 100644 --- a/include/Import/import_diaspora.php +++ b/include/Import/import_diaspora.php @@ -51,7 +51,6 @@ function import_diaspora($data) { 'account_id' => $account['account_id'], 'permissions_role' => 'social' )); - if(! $c['success']) return; @@ -106,8 +105,8 @@ function import_diaspora($data) { intval($channel_id) ); - if($data['aspects']) { - foreach($data['aspects'] as $aspect) { + if($data['user']['aspects']) { + foreach($data['user']['aspects'] as $aspect) { group_add($channel_id,escape_tags($aspect['name']),intval($aspect['contacts_visible'])); } } @@ -115,8 +114,8 @@ function import_diaspora($data) { // now add connections and send friend requests - if($data['contacts']) { - foreach($data['contacts'] as $contact) { + if($data['user']['contacts']) { + foreach($data['user']['contacts'] as $contact) { $result = new_contact($channel_id, $contact['person_diaspora_handle'], $c['channel']); if($result['success']) { if($contact['aspects']) { @@ -133,7 +132,6 @@ function import_diaspora($data) { // items and comments - proc_run('php','include/notifier.php','location',$channel_id); // This will indirectly perform a refresh_all *and* update the directory -- cgit v1.2.3