aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/Import/import_diaspora.php10
-rw-r--r--mod/import.php12
-rw-r--r--version.inc2
-rwxr-xr-xview/tpl/channel_import.tpl3
4 files changed, 14 insertions, 13 deletions
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
diff --git a/mod/import.php b/mod/import.php
index 02f4133d5..85491bc5e 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -93,17 +93,16 @@ function import_post(&$a) {
$data = json_decode($data,true);
- if(array_key_exists('user',$data) && array_key_exists('aspects',$data)) {
+// logger('import: data: ' . print_r($data,true));
+// print_r($data);
+
+
+ if(array_key_exists('user',$data) && array_key_exists('version',$data)) {
require_once('include/Import/import_diaspora.php');
import_diaspora($data);
return;
}
-
-// logger('import: data: ' . print_r($data,true));
-
-// print_r($data);
-
// import channel
$channel = $data['channel'];
@@ -515,6 +514,7 @@ function import_content(&$a) {
'$common' => t('For either option, please choose whether to make this hub your new primary address, or whether your old location should continue this role. You will be able to post from either location, but only one can be marked as the primary location for files, photos, and media.'),
'$label_import_primary' => t('Make this hub my primary location'),
'$label_import_posts' => t('Import existing posts if possible'),
+ '$pleasewait' => t('This process may take several minutes to complete. Please submit the form only once and leave this page open until finished.'),
'$email' => '',
'$pass' => '',
'$submit' => t('Submit')
diff --git a/version.inc b/version.inc
index e38c8df89..03a0995b5 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-06-20.1069
+2015-06-21.1070
diff --git a/view/tpl/channel_import.tpl b/view/tpl/channel_import.tpl
index f76594934..6974e4d30 100755
--- a/view/tpl/channel_import.tpl
+++ b/view/tpl/channel_import.tpl
@@ -36,5 +36,8 @@
<input type="submit" name="submit" id="import-submit-button" value="{{$submit}}" />
<div id="import-submit-end" class="import-field-end"></div>
+ <div id="import-common-desc" class="descriptive-paragraph">{{$pleasewait}}</div>
+
+
</form>