diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-19 10:06:46 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-19 10:06:46 +0000 |
| commit | 7f35e7c05158eaac89b731365bd941aba9ff073f (patch) | |
| tree | 8802a58bf462a822df66b4d42e8ef1affe349af1 /roundcubemail | |
| parent | 8f35ee81b6f626be5b16c330fa47a85e4d720209 (diff) | |
- Fix default_port option handling in Installer when config.inc.php file exists (#1487925)
git-svn-id: https://svn.roundcube.net/trunk@4789 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/installer/index.php | 2 | ||||
| -rw-r--r-- | roundcubemail/installer/rcube_install.php | 13 |
3 files changed, 9 insertions, 7 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 39d586733..53515f6d0 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix default_port option handling in Installer when config.inc.php file exists (#1487925) - Removed option focus_on_new_message, added newmail_notifier plugin - Added general rcube_cache class with Memcache and APC support - Improved caching performance by skipping writes of unchanged data diff --git a/roundcubemail/installer/index.php b/roundcubemail/installer/index.php index e09b82797..8df7ab0ef 100644 --- a/roundcubemail/installer/index.php +++ b/roundcubemail/installer/index.php @@ -41,7 +41,7 @@ if ($RCI->configured && ($RCI->getprop('enable_installer') || $_SESSION['allowin header('Content-type: text/plain'); header('Content-Disposition: attachment; filename="'.$filename.'"'); - + $RCI->merge_config(); echo $RCI->create_config($_GET['_mergeconfig'], true); exit; diff --git a/roundcubemail/installer/rcube_install.php b/roundcubemail/installer/rcube_install.php index 8ff6492d2..c8c103a95 100644 --- a/roundcubemail/installer/rcube_install.php +++ b/roundcubemail/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 |
