aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-09 15:56:51 -0800
committerredmatrix <git@macgirvin.com>2016-03-09 15:56:51 -0800
commit7732532964cfa43c371ee70418fea0279846c7b6 (patch)
treeb32b6dfacd3dc3d25cc5c8a17103a9fc7e8df232 /mod
parentb9b46a3f88d56f9ed6a89b34557abc27a7461449 (diff)
downloadvolse-hubzilla-7732532964cfa43c371ee70418fea0279846c7b6.tar.gz
volse-hubzilla-7732532964cfa43c371ee70418fea0279846c7b6.tar.bz2
volse-hubzilla-7732532964cfa43c371ee70418fea0279846c7b6.zip
handle UNO move channel operation
Diffstat (limited to 'mod')
-rw-r--r--mod/import.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/mod/import.php b/mod/import.php
index 0b239d822..f91f261a5 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -108,10 +108,9 @@ function import_account(&$a, $account_id) {
import_diaspora($data);
return;
}
-
- if(UNO)
- return;
-
+
+ $moving = false;
+
if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
$v1 = substr($data['compatibility']['database'],-4);
$v2 = substr(DB_UPDATE_VERSION,-4);
@@ -119,14 +118,13 @@ function import_account(&$a, $account_id) {
$t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
notice($t);
}
- if(array_key_exists('server_role',$data['compatibility'])
- && $data['compatibility']['server_role'] != Zotlabs\Project\System::get_server_role()) {
- notice( t('Server platform is not compatible. Operation not permitted.') . EOL);
- return;
- }
-
+ if(array_key_exists('server_role',$data['compatibility']) && $data['compatibility']['server_role'] == 'basic')
+ $moving = true;
}
+ if($moving)
+ $seize = 1;
+
// import channel
if(array_key_exists('channel',$data)) {
@@ -189,7 +187,7 @@ function import_account(&$a, $account_id) {
if($completed < 4) {
- if(is_array($data['hubloc'])) {
+ if(is_array($data['hubloc']) && (! $moving)) {
import_hublocs($channel,$data['hubloc'],$seize);
}