CC-2313: update INI value function needs fixing in upgrade scripts

-upgrade scripts were still broken...
This commit is contained in:
Martin Konecny 2011-05-24 17:49:31 -04:00
parent 6fd2985fe0
commit 6b00b29e75
3 changed files with 17 additions and 8 deletions

View File

@ -16,6 +16,7 @@ Highlights:
- In the "Add Media" page, the "start upload" button vanished after upload. Now it remains there after upload so it is possible to upload again. - In the "Add Media" page, the "start upload" button vanished after upload. Now it remains there after upload so it is possible to upload again.
- When canceling a playing show, the currently playing audio file still showed as playing. This has been fixed. - When canceling a playing show, the currently playing audio file still showed as playing. This has been fixed.
- Audio files greater than 100MB were not being played. - Audio files greater than 100MB were not being played.
- Fixed uploading audio on Chrome 11 and higher
1.8.1 - May 2, 2011 1.8.1 - May 2, 2011

View File

@ -164,10 +164,14 @@ function UpdateIniValue($p_filename, $p_property, $p_value)
{ {
$lines = file($p_filename); $lines = file($p_filename);
$n=count($lines); $n=count($lines);
for ($i=0; $i<$n; $i++) { foreach ($lines as &$line) {
if (strlen($lines[$i]) > strlen($p_property)) if ($line[0] != "#"){
if ($p_property == substr($lines[$i], 0, strlen($p_property))){ $key_value = split("=", $line);
$lines[$i] = "$p_property = $p_value\n"; $key = trim($key_value[0]);
if ($key == $p_property){
$line = "$p_property = $p_value".PHP_EOL;
}
} }
} }

View File

@ -164,10 +164,14 @@ function UpdateIniValue($p_filename, $p_property, $p_value)
{ {
$lines = file($p_filename); $lines = file($p_filename);
$n=count($lines); $n=count($lines);
for ($i=0; $i<$n; $i++) { foreach ($lines as &$line) {
if (strlen($lines[$i]) > strlen($p_property)) if ($line[0] != "#"){
if ($p_property == substr($lines[$i], 0, strlen($p_property))){ $key_value = split("=", $line);
$lines[$i] = "$p_property = $p_value\n"; $key = trim($key_value[0]);
if ($key == $p_property){
$line = "$p_property = $p_value".PHP_EOL;
}
} }
} }