- temp commit
This commit is contained in:
parent
dcf3526000
commit
a55bc9973c
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
require_once __DIR__."/configs/conf.php";
|
||||
Config::loadConfig();
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
require_once __DIR__."/configs/ACL.php";
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
|
||||
|
@ -20,13 +23,11 @@ require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
|
|||
date_default_timezone_set('UTC');
|
||||
require_once (APPLICATION_PATH."/logging/Logging.php");
|
||||
Logging::setLogPath('/var/log/airtime/zendphp.log');
|
||||
|
||||
Logging::info($CC_CONFIG);
|
||||
date_default_timezone_set(Application_Model_Preference::GetTimezone());
|
||||
|
||||
global $CC_CONFIG;
|
||||
$airtime_version = Application_Model_Preference::GetAirtimeVersion();
|
||||
$uniqueid = Application_Model_Preference::GetUniqueId();
|
||||
$CC_CONFIG['airtime_version'] = md5($airtime_version.$uniqueid);
|
||||
Config::setAirtimeVersion();
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
require_once __DIR__."/configs/navigation.php";
|
||||
|
||||
Zend_Validate::setDefaultNamespaces("Zend");
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* that the user can customize these.
|
||||
*/
|
||||
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$dbhost = $CC_CONFIG['dsn']['hostspec'];
|
||||
$dbname = $CC_CONFIG['dsn']['database'];
|
||||
|
|
|
@ -6,29 +6,20 @@
|
|||
* /etc/airtime/recorder.cfg
|
||||
*/
|
||||
|
||||
global $CC_CONFIG;
|
||||
|
||||
$CC_CONFIG = array(
|
||||
// prefix for table names in the database
|
||||
'tblNamePrefix' => 'cc_',
|
||||
|
||||
/* ================================================ storage configuration */
|
||||
|
||||
'soundcloud-client-id' => '2CLCxcSXYzx7QhhPVHN4A',
|
||||
'soundcloud-client-secret' => 'pZ7beWmF06epXLHVUP1ufOg2oEnIt9XhE8l8xt0bBs',
|
||||
|
||||
"rootDir" => __DIR__."/../.."
|
||||
);
|
||||
|
||||
|
||||
$configFile = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : "/etc/airtime/airtime.conf";
|
||||
Config::loadConfig($configFile);
|
||||
|
||||
class Config {
|
||||
public static function loadConfig($p_path) {
|
||||
global $CC_CONFIG;
|
||||
private static $CC_CONFIG;
|
||||
public static function loadConfig() {
|
||||
$CC_CONFIG = array(
|
||||
/* ================================================ storage configuration */
|
||||
|
||||
'soundcloud-client-id' => '2CLCxcSXYzx7QhhPVHN4A',
|
||||
'soundcloud-client-secret' => 'pZ7beWmF06epXLHVUP1ufOg2oEnIt9XhE8l8xt0bBs',
|
||||
|
||||
"rootDir" => __DIR__."/../.."
|
||||
);
|
||||
|
||||
$filename = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : "/etc/airtime/airtime.conf";
|
||||
|
||||
$filename = $p_path;
|
||||
$values = parse_ini_file($filename, true);
|
||||
|
||||
// Name of the web server user
|
||||
|
@ -62,5 +53,16 @@ class Config {
|
|||
if(isset($values['demo']['demo'])){
|
||||
$CC_CONFIG['demo'] = $values['demo']['demo'];
|
||||
}
|
||||
self::$CC_CONFIG = $CC_CONFIG;
|
||||
}
|
||||
|
||||
public static function setAirtimeVersion() {
|
||||
$airtime_version = Application_Model_Preference::GetAirtimeVersion();
|
||||
$uniqueid = Application_Model_Preference::GetUniqueId();
|
||||
self::$CC_CONFIG['airtime_version'] = md5($airtime_version.$uniqueid);
|
||||
}
|
||||
|
||||
public static function getConfig() {
|
||||
return self::$CC_CONFIG;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue