From bb1fb5e74efdaa122c3005eab1cc24c1b8a18669 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 18 May 2011 15:17:17 -0400 Subject: [PATCH] CC-2271 1.8.2 code cleanup tasks need to set globals. --- install/upgrades/airtime-1.8.1/airtime-upgrade.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install/upgrades/airtime-1.8.1/airtime-upgrade.php b/install/upgrades/airtime-1.8.1/airtime-upgrade.php index 60fe1bb1f..8f36fd1f0 100644 --- a/install/upgrades/airtime-1.8.1/airtime-upgrade.php +++ b/install/upgrades/airtime-1.8.1/airtime-upgrade.php @@ -18,9 +18,9 @@ const CONF_DIR_STORAGE = "/srv/airtime"; const CONF_DIR_WWW = "/var/www/airtime"; const CONF_DIR_LOG = "/var/log/airtime"; -$AIRTIME_SRC = __DIR__.'/../../../airtime_mvc'; -$AIRTIME_UTILS = __DIR__.'/../../../utils'; -$AIRTIME_PYTHON_APPS = __DIR__.'/../../../python_apps'; +global $AIRTIME_SRC = __DIR__.'/../../../airtime_mvc'; +global $AIRTIME_UTILS = __DIR__.'/../../../utils'; +global $AIRTIME_PYTHON_APPS = __DIR__.'/../../../python_apps'; $configFiles = array(CONF_FILE_AIRTIME, CONF_FILE_PYPO, @@ -112,6 +112,9 @@ function LoadConfig($CC_CONFIG) { */ function CreateIniFiles() { + global $AIRTIME_SRC; + global $AIRTIME_PYTHON_APPS; + if (!file_exists("/etc/airtime/")){ if (!mkdir("/etc/airtime/", 0755, true)){ echo "Could not create /etc/airtime/ directory. Exiting."; @@ -210,6 +213,7 @@ function MergeConfigFiles($configFiles, $suffix) function InstallPhpCode() { global $CC_CONFIG; + global $AIRTIME_SRC; echo "* Installing PHP code to ".$CC_CONFIG['phpDir'].PHP_EOL; exec("mkdir -p ".$CC_CONFIG['phpDir']); exec("cp -R ".$AIRTIME_SRC."/* ".$CC_CONFIG['phpDir']);