installer: do not create unneeded blank line at the end of config.php
This commit is contained in:
parent
f0d7c1ac86
commit
c93f98e123
|
@ -114,6 +114,8 @@
|
||||||
|
|
||||||
$rv = "";
|
$rv = "";
|
||||||
|
|
||||||
|
$finished = false;
|
||||||
|
|
||||||
foreach ($data as $line) {
|
foreach ($data as $line) {
|
||||||
if (preg_match("/define\('DB_TYPE'/", $line)) {
|
if (preg_match("/define\('DB_TYPE'/", $line)) {
|
||||||
$rv .= "\tdefine('DB_TYPE', '$DB_TYPE');\n";
|
$rv .= "\tdefine('DB_TYPE', '$DB_TYPE');\n";
|
||||||
|
@ -129,9 +131,13 @@
|
||||||
$rv .= "\tdefine('DB_PORT', '$DB_PORT');\n";
|
$rv .= "\tdefine('DB_PORT', '$DB_PORT');\n";
|
||||||
} else if (preg_match("/define\('SELF_URL_PATH'/", $line)) {
|
} else if (preg_match("/define\('SELF_URL_PATH'/", $line)) {
|
||||||
$rv .= "\tdefine('SELF_URL_PATH', '$SELF_URL_PATH');\n";
|
$rv .= "\tdefine('SELF_URL_PATH', '$SELF_URL_PATH');\n";
|
||||||
} else {
|
} else if (!$finished) {
|
||||||
$rv .= "$line\n";
|
$rv .= "$line\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preg_match("/\?\>/", $line)) {
|
||||||
|
$finished = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rv;
|
return $rv;
|
||||||
|
|
Loading…
Reference in New Issue