cleanup of import to allow cross-product import going one way. Note - items/content are not yet importable
This commit is contained in:
parent
1e3dffc29d
commit
d5c085a3c6
@ -106,23 +106,18 @@ function import_post(&$a) {
|
|||||||
if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
|
if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
|
||||||
$v1 = substr($data['compatibility']['database'],-4);
|
$v1 = substr($data['compatibility']['database'],-4);
|
||||||
$v2 = substr(DB_UPDATE_VERSION,-4);
|
$v2 = substr(DB_UPDATE_VERSION,-4);
|
||||||
if($data['compatibility']['project'] !== PLATFORM_NAME) {
|
if($v2 > $v1) {
|
||||||
notice( t('The data provided is not compatible with this project.') );
|
$t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
|
||||||
return;
|
notice($t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($v2 > $v1) {
|
|
||||||
$t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
|
|
||||||
notice($t);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// import channel
|
// import channel
|
||||||
|
|
||||||
$channel = $data['channel'];
|
$channel = $data['channel'];
|
||||||
|
|
||||||
if(! array_key_exists('channel_system',$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);
|
$channel['channel_removed'] = (($channel['channel_pageflags'] & 0x8000) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user