CC-2172 : Create Upgrade structure so that a user can upgrade from any version of Airtime properly
This commit is contained in:
parent
8f1d9e8d86
commit
e56f50e8b2
|
@ -10,10 +10,27 @@ require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
|||
|
||||
AirtimeIni::ExitIfNotRoot();
|
||||
|
||||
if(file_exists(dirname(__FILE__).'/../VERSION')) {
|
||||
$version = file_get_contents(dirname(__FILE__).'/../VERSION');
|
||||
echo "Airtime Version: ".$version." ".PHP_EOL;
|
||||
}
|
||||
else if(AirtimeInstall::DbTableExists('cc_show_rebroadcast') === true) {
|
||||
$version = "1.7.0";
|
||||
echo "Airtime Version: ".$version." ".PHP_EOL;
|
||||
}
|
||||
else {
|
||||
$version = "1.6";
|
||||
echo "Airtime Version: ".$version." ".PHP_EOL;
|
||||
}
|
||||
|
||||
echo "******************************** Update Begin *********************************".PHP_EOL;
|
||||
|
||||
//system("php ".__DIR__."/upgrades/airtime-1.7/airtime-upgrade.php");
|
||||
system("php ".__DIR__."/upgrades/airtime-1.8/airtime-upgrade.php");
|
||||
if(strcmp($version, "1.7.0") < 0) {
|
||||
system("php ".__DIR__."/upgrades/airtime-1.7/airtime-upgrade.php");
|
||||
}
|
||||
if(strcmp($version, "1.8.0") < 0) {
|
||||
system("php ".__DIR__."/upgrades/airtime-1.8/airtime-upgrade.php");
|
||||
}
|
||||
|
||||
echo "******************************* Update Complete *******************************".PHP_EOL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue