CC-2281 Install script should check for pre-installed versions and prompt user to upgrade/full installation
moving constants in conf.php to constants.php
This commit is contained in:
parent
e7589f6007
commit
a2ec9b4d10
|
@ -6,10 +6,6 @@
|
||||||
* /etc/airtime/recorder.cfg
|
* /etc/airtime/recorder.cfg
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('AIRTIME_VERSION', '1.8.2');
|
|
||||||
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
|
||||||
define('AIRTIME_REST_VERSION', '1.1');
|
|
||||||
|
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$CC_CONFIG = array(
|
$CC_CONFIG = array(
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
define('AIRTIME_VERSION', '1.8.2');
|
||||||
|
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
||||||
|
define('AIRTIME_REST_VERSION', '1.1');
|
||||||
|
|
||||||
// Metadata Keys
|
// Metadata Keys
|
||||||
define('UI_MDATA_KEY_TITLE', 'dc:title');
|
define('UI_MDATA_KEY_TITLE', 'dc:title');
|
||||||
define('UI_MDATA_KEY_CREATOR', 'dc:creator');
|
define('UI_MDATA_KEY_CREATOR', 'dc:creator');
|
||||||
|
|
|
@ -5,6 +5,7 @@ set_include_path(__DIR__.'/../airtime_mvc/library' . PATH_SEPARATOR . get_includ
|
||||||
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
||||||
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
|
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
|
||||||
|
|
||||||
|
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/constants.php');
|
||||||
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
|
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
|
||||||
|
|
||||||
echo PHP_EOL."*** Database Installation ***".PHP_EOL;
|
echo PHP_EOL."*** Database Installation ***".PHP_EOL;
|
||||||
|
@ -21,7 +22,7 @@ if ($databaseExisted){
|
||||||
//Database already exists. Ask the user how they want to
|
//Database already exists. Ask the user how they want to
|
||||||
//proceed. Warn them that creating the database tables again
|
//proceed. Warn them that creating the database tables again
|
||||||
//will cause them to lose their old ones.
|
//will cause them to lose their old ones.
|
||||||
|
|
||||||
$userAnswer = "x";
|
$userAnswer = "x";
|
||||||
while (!in_array($userAnswer, array("y", "Y", "n", "N", ""))) {
|
while (!in_array($userAnswer, array("y", "Y", "n", "N", ""))) {
|
||||||
echo PHP_EOL."Database already exists. Do you want to delete all tables and recreate? (y/N)";
|
echo PHP_EOL."Database already exists. Do you want to delete all tables and recreate? (y/N)";
|
||||||
|
|
|
@ -11,12 +11,15 @@ echo "******************************** Install Begin ***************************
|
||||||
|
|
||||||
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
||||||
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
|
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
|
||||||
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
|
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/constants.php');
|
||||||
|
|
||||||
AirtimeInstall::ExitIfNotRoot();
|
AirtimeInstall::ExitIfNotRoot();
|
||||||
|
|
||||||
$version = AirtimeInstall::CheckForVersionBeforeInstall();
|
$version = AirtimeInstall::CheckForVersionBeforeInstall();
|
||||||
|
|
||||||
|
require_once('Zend/Loader/Autoloader.php');
|
||||||
|
$autoloader = Zend_Loader_Autoloader::getInstance();
|
||||||
|
|
||||||
//a previous version exists.
|
//a previous version exists.
|
||||||
if(isset($version) && $version != false && $version < AIRTIME_VERSION) {
|
if(isset($version) && $version != false && $version < AIRTIME_VERSION) {
|
||||||
|
|
||||||
|
@ -47,9 +50,6 @@ if(isset($version) && $version != false && $version < AIRTIME_VERSION) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once('Zend/Loader/Autoloader.php');
|
|
||||||
$autoloader = Zend_Loader_Autoloader::getInstance();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$opts = new Zend_Console_Getopt(
|
$opts = new Zend_Console_Getopt(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -15,6 +15,7 @@ if (!file_exists(AirtimeIni::CONF_FILE_AIRTIME)) {
|
||||||
echo "Most likely this means that Airtime is not installed, so there is nothing to do.".PHP_EOL.PHP_EOL;
|
echo "Most likely this means that Airtime is not installed, so there is nothing to do.".PHP_EOL.PHP_EOL;
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/constants.php');
|
||||||
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
|
require_once(AirtimeInstall::GetAirtimeSrcDir().'/application/configs/conf.php');
|
||||||
|
|
||||||
echo PHP_EOL;
|
echo PHP_EOL;
|
||||||
|
|
Loading…
Reference in New Issue