installer: do not create unneeded blank line at the end of config.php

master
Andrew Dolgov 12 years ago
parent f0d7c1ac86
commit c93f98e123

@ -114,6 +114,8 @@
$rv = "";
$finished = false;
foreach ($data as $line) {
if (preg_match("/define\('DB_TYPE'/", $line)) {
$rv .= "\tdefine('DB_TYPE', '$DB_TYPE');\n";
@ -129,9 +131,13 @@
$rv .= "\tdefine('DB_PORT', '$DB_PORT');\n";
} else if (preg_match("/define\('SELF_URL_PATH'/", $line)) {
$rv .= "\tdefine('SELF_URL_PATH', '$SELF_URL_PATH');\n";
} else {
} else if (!$finished) {
$rv .= "$line\n";
}
if (preg_match("/\?\>/", $line)) {
$finished = true;
}
}
return $rv;

Loading…
Cancel
Save