From 66593cb1a1b16f2b25b71980b862cd4ea5c21d6d Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Wed, 27 Jul 2011 14:59:10 +0200 Subject: [PATCH] CC-2604 : Config files not copied across updates from multiple versions, incorrect path. --- install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php | 6 +++--- install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php index dad5f18d1..d05985a20 100644 --- a/install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php @@ -121,7 +121,7 @@ function CreateIniFiles() } } - if (!copy("airtime.conf.181", CONF_FILE_AIRTIME)){ + if (!copy(__DIR__."/airtime.conf.181", CONF_FILE_AIRTIME)){ echo "Could not copy airtime.conf to /etc/airtime/. Exiting."; exit(1); } @@ -162,8 +162,8 @@ function UpdateIniValue($p_filename, $p_property, $p_value) foreach ($lines as &$line) { if ($line[0] != "#"){ $key_value = split("=", $line); - $key = trim($key_value[0]); - + $key = trim($key_value[0]); + if ($key == $p_property){ $line = "$p_property = $p_value".PHP_EOL; } diff --git a/install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php index 29d799669..6ed7d1ec7 100644 --- a/install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php @@ -121,7 +121,7 @@ function CreateIniFiles() } } - if (!copy("airtime.conf.182", CONF_FILE_AIRTIME)){ + if (!copy(__DIR__."/airtime.conf.182", CONF_FILE_AIRTIME)){ echo "Could not copy airtime.conf to /etc/airtime/. Exiting."; exit(1); } @@ -162,8 +162,8 @@ function UpdateIniValue($p_filename, $p_property, $p_value) foreach ($lines as &$line) { if ($line[0] != "#"){ $key_value = split("=", $line); - $key = trim($key_value[0]); - + $key = trim($key_value[0]); + if ($key == $p_property){ $line = "$p_property = $p_value".PHP_EOL; }