aboutsummaryrefslogtreecommitdiffstats
path: root/mod/import.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-30 20:21:09 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-30 20:21:09 -0700
commitd5c085a3c6e04ff53b81e47d74cc4381c5ef5875 (patch)
tree53e48d30ce34580d6d8dffc8464675cecd6c8d87 /mod/import.php
parent1e3dffc29d929d94a523910749ff86f2229203c5 (diff)
downloadvolse-hubzilla-d5c085a3c6e04ff53b81e47d74cc4381c5ef5875.tar.gz
volse-hubzilla-d5c085a3c6e04ff53b81e47d74cc4381c5ef5875.tar.bz2
volse-hubzilla-d5c085a3c6e04ff53b81e47d74cc4381c5ef5875.zip
cleanup of import to allow cross-product import going one way. Note - items/content are not yet importable
Diffstat (limited to 'mod/import.php')
-rw-r--r--mod/import.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/mod/import.php b/mod/import.php
index 09c63e8c7..f8ab8a0a2 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -106,23 +106,18 @@ function import_post(&$a) {
if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
$v1 = substr($data['compatibility']['database'],-4);
$v2 = substr(DB_UPDATE_VERSION,-4);
- if($data['compatibility']['project'] !== PLATFORM_NAME) {
- notice( t('The data provided is not compatible with this project.') );
- return;
+ if($v2 > $v1) {
+ $t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
+ notice($t);
}
}
- if($v2 > $v1) {
- $t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
- notice($t);
- }
-
// import channel
$channel = $data['channel'];
if(! array_key_exists('channel_system',$channel)) {
- $channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);
+ $channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);
$channel['channel_removed'] = (($channel['channel_pageflags'] & 0x8000) ? 1 : 0);
}