Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/rcmail_install.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/program/include/rcmail_install.php b/program/include/rcmail_install.php
index c91a61514..668ab502c 100644
--- a/program/include/rcmail_install.php
+++ b/program/include/rcmail_install.php
@@ -202,16 +202,23 @@ class rcmail_install
* Create configuration file that contains parameters
* that differ from default values.
*
+ * @param bool $use_post Use POSTed configuration values (of supported options)
+ *
* @return string The complete config file content
*/
- public function create_config()
+ public function create_config($use_post = true)
{
$config = [];
foreach ($this->config as $prop => $default) {
$post_value = $_POST["_$prop"] ?? null;
- $is_default = $post_value === null || !in_array($prop, $this->supported_config);
- $value = !$is_default || in_array($prop, $this->bool_config_props) ? $post_value : $default;
+ $value = $default;
+
+ if ($use_post && in_array($prop, $this->supported_config)
+ && ($post_value !== null || in_array($prop, $this->bool_config_props))
+ ) {
+ $value = $post_value;
+ }
// always disable installer
if ($prop == 'enable_installer') {