From eaf9003ca27c52c571f940e49fcfba6e1c8fe629 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 20 Apr 2021 08:09:33 +0000 Subject: when importing a channel, make sure we import the xchan before the hubloc - otherwise we can not verify the hubloc hash --- Zotlabs/Module/Import.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Zotlabs/Module/Import.php') diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index 8ef24b232..4622a588d 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -209,12 +209,6 @@ class Import extends \Zotlabs\Web\Controller { logger('import step 3'); - if(is_array($data['hubloc'])) { - import_hublocs($channel,$data['hubloc'],$seize,$moving); - } - - logger('import step 4'); - // create new hubloc for the new channel at this site if(array_key_exists('channel',$data)) { @@ -277,7 +271,7 @@ class Import extends \Zotlabs\Web\Controller { } - logger('import step 5'); + logger('import step 4'); // import xchans and contact photos @@ -335,7 +329,7 @@ class Import extends \Zotlabs\Web\Controller { } - logger('import step 6'); + logger('import step 5'); // import xchans $xchans = $data['xchan']; @@ -404,7 +398,14 @@ class Import extends \Zotlabs\Web\Controller { } } - logger('import step 7'); + logger('import step 6'); + } + + logger('import step 7'); + + // this must happen after xchans got imported! + if(is_array($data['hubloc'])) { + import_hublocs($channel,$data['hubloc'],$seize,$moving); } $friends = 0; -- cgit v1.2.3