CC-2271 1.8.2 code cleanup tasks

need to set globals.
This commit is contained in:
Naomi 2011-05-18 15:17:17 -04:00
parent 2044e4bda8
commit bb1fb5e74e
1 changed files with 7 additions and 3 deletions

View File

@ -18,9 +18,9 @@ const CONF_DIR_STORAGE = "/srv/airtime";
const CONF_DIR_WWW = "/var/www/airtime"; const CONF_DIR_WWW = "/var/www/airtime";
const CONF_DIR_LOG = "/var/log/airtime"; const CONF_DIR_LOG = "/var/log/airtime";
$AIRTIME_SRC = __DIR__.'/../../../airtime_mvc'; global $AIRTIME_SRC = __DIR__.'/../../../airtime_mvc';
$AIRTIME_UTILS = __DIR__.'/../../../utils'; global $AIRTIME_UTILS = __DIR__.'/../../../utils';
$AIRTIME_PYTHON_APPS = __DIR__.'/../../../python_apps'; global $AIRTIME_PYTHON_APPS = __DIR__.'/../../../python_apps';
$configFiles = array(CONF_FILE_AIRTIME, $configFiles = array(CONF_FILE_AIRTIME,
CONF_FILE_PYPO, CONF_FILE_PYPO,
@ -112,6 +112,9 @@ function LoadConfig($CC_CONFIG) {
*/ */
function CreateIniFiles() function CreateIniFiles()
{ {
global $AIRTIME_SRC;
global $AIRTIME_PYTHON_APPS;
if (!file_exists("/etc/airtime/")){ if (!file_exists("/etc/airtime/")){
if (!mkdir("/etc/airtime/", 0755, true)){ if (!mkdir("/etc/airtime/", 0755, true)){
echo "Could not create /etc/airtime/ directory. Exiting."; echo "Could not create /etc/airtime/ directory. Exiting.";
@ -210,6 +213,7 @@ function MergeConfigFiles($configFiles, $suffix)
function InstallPhpCode() function InstallPhpCode()
{ {
global $CC_CONFIG; global $CC_CONFIG;
global $AIRTIME_SRC;
echo "* Installing PHP code to ".$CC_CONFIG['phpDir'].PHP_EOL; echo "* Installing PHP code to ".$CC_CONFIG['phpDir'].PHP_EOL;
exec("mkdir -p ".$CC_CONFIG['phpDir']); exec("mkdir -p ".$CC_CONFIG['phpDir']);
exec("cp -R ".$AIRTIME_SRC."/* ".$CC_CONFIG['phpDir']); exec("cp -R ".$AIRTIME_SRC."/* ".$CC_CONFIG['phpDir']);