Commit c2a1c72d authored by tbrehm's avatar tbrehm
Browse files

Added a version check to ensure that this update is used only for ISPConfig > 3.0.3

parent 64f24e4e
......@@ -113,7 +113,7 @@ function updateDbAndIni() {
$ini_array = ini_to_array(stripslashes($tmp['config']));
$current_db_version = (isset($tmp['dbversion']))?intval($tmp['dbversion']):0;
if(count($ini_array) == 0) die('Unable to read server configuration from database.');
if(!is_array($ini_array) or count($ini_array) == 0) die('Unable to read server configuration from database.');
$conf['services']['mail'] = ($tmp['mail_server'] == 1)?true:false;
$conf['services']['web'] = ($tmp['web_server'] == 1)?true:false;
......
......@@ -78,6 +78,9 @@ unset($conf);
if($dist['id'] == '') die('Linux distribution or version not recognized.');
//** Check version
if(compare_ispconfig_version('3.0.3',ISPC_APP_VERSION) < 0) die('This updater is for ISPConfig versions > 3.0.3.0. Please Update to ISPConfig 3.0.3.3 first before you update to the current ISPConfig version.');
//** Include the distribution-specific installer class library and configuration
if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php');
include_once('dist/lib/'.$dist['id'].'.lib.php');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment