{ public static function start() { } } /* This class deals with any modifications to config files in /etc/airtime * as well as backups. All functions other than start() should be marked * as private. */ class AirtimeConfigFileUpgrade { public static function start() { UpgradeCommon::upgradeConfigFiles(); } } /* Into this class put operations that don't fit into any of the other * 3 classes. For example, there may be stray files scattered throughout * the filesystem that we don't need anymore. Put the functions to clean * those out into this class. */ class AirtimeMiscUpgrade { public static function start() { } } UpgradeCommon::connectToDatabase(); AirtimeDatabaseUpgrade::start(); AirtimeStorWatchedDirsUpgrade::start(); AirtimeConfigFileUpgrade::start(); AirtimeMiscUpgrade::start();
/* function get_conf_location(){ $conf = parse_ini_file("/etc/airtime/airtime.conf", TRUE); $airtime_dir = $conf['general']['airtime_dir']; return $airtime_dir."/"."application/configs/conf.php"; } * */ // Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(__DIR__ . '/../../../airtime_mvc/application')); // Ensure library is on include_path set_include_path(implode(PATH_SEPARATOR, array(get_include_path(), realpath(APPLICATION_PATH . '/../library')))); //Propel classes. set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path()); include_once 'propel/runtime/lib/Propel.php'; Propel::init(__DIR__ . "/propel/airtime-conf.php"); //$conf_path = get_conf_location(); //require_once $conf_path; set_include_path(__DIR__ . '/../../../airtime_mvc/library' . PATH_SEPARATOR . get_include_path()); require_once 'propel/runtime/lib/Propel.php'; require_once 'common/UpgradeCommon.php'; require_once 'ConfFileUpgrade.php'; require_once 'DbUpgrade.php'; require_once 'MiscUpgrade.php'; $filename = "/etc/airtime/airtime.conf"; $values = parse_ini_file($filename, true); UpgradeCommon::connectToDatabase(); UpgradeCommon::SetDefaultTimezone(); AirtimeConfigFileUpgrade::start(); AirtimeDatabaseUpgrade::start($values); AirtimeMiscUpgrade::start($values);