summaryrefslogtreecommitdiff
path: root/installer/rcube_install.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-05-19 10:06:46 +0000
committeralecpl <alec@alec.pl>2011-05-19 10:06:46 +0000
commit403f0bf771d022964412bb646532c19431710d65 (patch)
tree383b7ac8bb2ab39b71e0ddbd3f8be1e5bd473083 /installer/rcube_install.php
parent4bb7d27b5468630efaa703e7240a86eb134423e9 (diff)
- Fix default_port option handling in Installer when config.inc.php file exists (#1487925)
Diffstat (limited to 'installer/rcube_install.php')
-rw-r--r--installer/rcube_install.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index 8ff6492d2..c8c103a95 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -123,8 +123,8 @@ class rcube_install
return $value !== null && $value !== '' ? $value : $default;
}
-
-
+
+
/**
* Take the default config file and replace the parameters
* with the submitted form data
@@ -135,13 +135,14 @@ class rcube_install
function create_config($which, $force = false)
{
$out = @file_get_contents(RCMAIL_CONFIG_DIR . "/{$which}.inc.php.dist");
-
+
if (!$out)
return '[Warning: could not read the config template file]';
foreach ($this->config as $prop => $default) {
+
$value = (isset($_POST["_$prop"]) || $this->bool_config_props[$prop]) ? $_POST["_$prop"] : $default;
-
+
// convert some form data
if ($prop == 'debug_level') {
$val = 0;
@@ -193,9 +194,9 @@ class rcube_install
else if (is_numeric($value)) {
$value = intval($value);
}
-
+
// skip this property
- if (!$force && ($value == $default))
+ if (!$force && !$this->configured && ($value == $default))
continue;
// save change