aboutsummaryrefslogtreecommitdiffstats
path: root/mod/import.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-06-07 03:46:43 +0100
committerThomas Willingham <founder@kakste.com>2013-06-07 03:46:43 +0100
commit466a6d5227fbaf0a36cd76b5603cb42bb1b7462b (patch)
tree395936a63e27fa105e0dc69d13c1b951dc9e9439 /mod/import.php
parentdc6472e046ee6ac0afc934e8ad1edc1e281a3cb0 (diff)
parentc21f8c68e39e22a0348e5717109f0005d4d35809 (diff)
downloadvolse-hubzilla-466a6d5227fbaf0a36cd76b5603cb42bb1b7462b.tar.gz
volse-hubzilla-466a6d5227fbaf0a36cd76b5603cb42bb1b7462b.tar.bz2
volse-hubzilla-466a6d5227fbaf0a36cd76b5603cb42bb1b7462b.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/import.php')
-rw-r--r--mod/import.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/import.php b/mod/import.php
index 9443f5c60..d1b3216d0 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -4,7 +4,7 @@
// connection to original server.
require_once('include/Contact.php');
-
+require_once('include/zot.php');
function import_post(&$a) {
@@ -39,7 +39,7 @@ function import_post(&$a) {
$servername = substr($old_address,strpos($old_address,'@')+1);
$scheme = 'https://';
- $api_path = '/api/export/basic?f=&channel=' . $channelname;
+ $api_path = '/api/red/channel/export/basic?f=&channel=' . $channelname;
$binary = false;
$redirects = 0;
$opts = array('http_auth' => $email . ':' . $password);
@@ -60,6 +60,7 @@ function import_post(&$a) {
return;
}
+ $data = json_decode($data,true);
// logger('import: data: ' . print_r($data,true));
@@ -113,6 +114,8 @@ function import_post(&$a) {
// reset
$channel = $r[0];
+ set_default_login_identity($a->get_account(),$channel['channel_id'],false);
+
if($data['photo']) {
require_once('include/photo/photo_driver.php');
import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],get_account_id,$channel['channel_id']);