diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-30 20:19:50 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-30 20:19:50 -0700 |
commit | 1e3dffc29d929d94a523910749ff86f2229203c5 (patch) | |
tree | 44842d693a73ba3ba195e0808676f4bf4806bed9 /mod | |
parent | 86b12ea75037e2e80d4d7f678a1036735f79bcb4 (diff) | |
parent | 22cb09f537118f87c8e61cce51c0a35b9713e457 (diff) | |
download | volse-hubzilla-1e3dffc29d929d94a523910749ff86f2229203c5.tar.gz volse-hubzilla-1e3dffc29d929d94a523910749ff86f2229203c5.tar.bz2 volse-hubzilla-1e3dffc29d929d94a523910749ff86f2229203c5.zip |
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Diffstat (limited to 'mod')
-rw-r--r-- | mod/import.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/import.php b/mod/import.php index c55eb8723..09c63e8c7 100644 --- a/mod/import.php +++ b/mod/import.php @@ -103,6 +103,20 @@ function import_post(&$a) { 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); + 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); + } + + // import channel $channel = $data['channel']; |