From 6bd90816dd76d5fbd2374f72ac302537bc1ef047 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 19 Jun 2015 16:39:03 -0700 Subject: 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. --- mod/import.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mod/import.php') 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']) ); } -- cgit v1.2.3