summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-30 10:14:47 +0400
committerAndrew Dolgov <[email protected]>2013-03-30 10:14:47 +0400
commitc93f98e1231b5fcdd0cac334df50998f36314510 (patch)
treeeec75579c86ce06409177e150d0d422a77843dd3 /install
parentf0d7c1ac86bfa39812339440d8d193399c71bde5 (diff)
installer: do not create unneeded blank line at the end of config.php
Diffstat (limited to 'install')
-rw-r--r--install/index.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/install/index.php b/install/index.php
index ba71bbdba..6e141f077 100644
--- a/install/index.php
+++ b/install/index.php
@@ -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;