diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-19 16:39:03 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-19 16:39:03 -0700 |
commit | 6bd90816dd76d5fbd2374f72ac302537bc1ef047 (patch) | |
tree | 559f45b371f14a48ab589e9b0a07d24235f2393c /mod | |
parent | 25e134dd9cb4768291517678286a197d5a4e79a6 (diff) | |
download | volse-hubzilla-6bd90816dd76d5fbd2374f72ac302537bc1ef047.tar.gz volse-hubzilla-6bd90816dd76d5fbd2374f72ac302537bc1ef047.tar.bz2 volse-hubzilla-6bd90816dd76d5fbd2374f72ac302537bc1ef047.zip |
very early attempt diaspora import from diaspora export file. Currently the json export has to be gunzipped prior to uploading and we're net yet adding connections (which should come soon) and we can't import items until they add guids to the export file - so consider it a work in progress. This first attempt should create a channel and get your profile details setup providing there isn't a nickname conflict on the server. That will also be handled later.
Diffstat (limited to 'mod')
-rw-r--r-- | mod/import.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mod/import.php b/mod/import.php index 088c5cb61..4542ef7a0 100644 --- a/mod/import.php +++ b/mod/import.php @@ -84,6 +84,13 @@ function import_post(&$a) { $data = json_decode($data,true); + if(array_key_exists('user',$data) && array_key_exists('aspects',$data)) { + require_once('include/Import/import_diaspora.php'); + import_diaspora($data); + return; + } + + // logger('import: data: ' . print_r($data,true)); // print_r($data); @@ -308,7 +315,7 @@ function import_post(&$a) { dbesc($photos[2]), dbesc($photos[3]), dbesc($photodate), - dbesc($xchan_hash) + dbesc($xchan['xchan_hash']) ); } |