aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-05 23:45:16 -0800
committerredmatrix <git@macgirvin.com>2016-02-05 23:45:16 -0800
commit021584d782c5bfafaa5ffe26d0c5850c8fffdd8f (patch)
tree9b769314fd87af25367f67ebf6d2fd673d4a08e5
parenta5c111ef4f1876f0ae708ae0c15877a72891b5b5 (diff)
downloadvolse-hubzilla-021584d782c5bfafaa5ffe26d0c5850c8fffdd8f.tar.gz
volse-hubzilla-021584d782c5bfafaa5ffe26d0c5850c8fffdd8f.tar.bz2
volse-hubzilla-021584d782c5bfafaa5ffe26d0c5850c8fffdd8f.zip
fix uno import by disabling for now
-rw-r--r--include/identity.php2
-rw-r--r--mod/import.php9
2 files changed, 10 insertions, 1 deletions
diff --git a/include/identity.php b/include/identity.php
index 898827525..0b9842caf 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -484,7 +484,7 @@ function identity_basic_export($channel_id, $items = false) {
// use constants here as otherwise we will have no idea if we can import from a site
// with a non-standard platform and version.
- $ret['compatibility'] = array('project' => PLATFORM_NAME, 'version' => RED_VERSION, 'database' => DB_UPDATE_VERSION);
+ $ret['compatibility'] = array('project' => PLATFORM_NAME, 'version' => RED_VERSION, 'database' => DB_UPDATE_VERSION, 'server_role' => UNO );
$r = q("select * from channel where channel_id = %d limit 1",
intval($channel_id)
diff --git a/mod/import.php b/mod/import.php
index b6091d944..1a2c87a63 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -109,6 +109,9 @@ function import_account(&$a, $account_id) {
return;
}
+ if(UNO)
+ return;
+
if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
$v1 = substr($data['compatibility']['database'],-4);
$v2 = substr(DB_UPDATE_VERSION,-4);
@@ -116,6 +119,12 @@ 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'] != UNO) {
+ notice( t('Server platform is not compatible. Operation not permitted.') . EOL);
+ return;
+ }
+
}
// import channel