summaryrefslogtreecommitdiff
path: root/installer/rcube_install.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-08-27 10:58:33 +0000
committeralecpl <alec@alec.pl>2008-08-27 10:58:33 +0000
commitb77d0dd6c5574d9841cd5d040dfcc351a58ccb82 (patch)
tree6c8e872c3d4be368f2fa631f2421d3935e71ab21 /installer/rcube_install.php
parentd5c539942e3cb4ad623a3f3f0344fc45af371981 (diff)
- added options to use syslog instead of log file (#1484850)
- added Logging & Debugging section in Installer - fixed config from $_POST for next installer steps saving - fixed and re-enabled debug_level setting in installer
Diffstat (limited to 'installer/rcube_install.php')
-rw-r--r--installer/rcube_install.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index 024046755..e3382537e 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -100,7 +100,7 @@ class rcube_install
*/
function getprop($name, $default = '')
{
- $value = $this->is_post && (isset($_POST["_$name"]) || $this->config_props[$name]) ? $_POST["_$name"] : $this->config[$name];
+ $value = $this->config[$name];
if ($name == 'des_key' && !$this->configured && !isset($_REQUEST["_$name"]))
$value = rcube_install::random_key(24);
@@ -127,11 +127,12 @@ class rcube_install
$value = (isset($_POST["_$prop"]) || $this->config_props[$prop]) ? $_POST["_$prop"] : $default;
// convert some form data
- if ($prop == 'debug_level' && is_array($value)) {
+ if ($prop == 'debug_level') {
$val = 0;
- foreach ($value as $i => $dbgval)
- $val += intval($dbgval);
- $value = $val;
+ if (isset($value))
+ foreach ($value as $dbgval)
+ $val += intval($dbgval);
+ $value = $val;
}
else if ($prop == 'db_dsnw' && !empty($_POST['_dbtype'])) {
if ($_POST['_dbtype'] == 'sqlite')
@@ -168,7 +169,10 @@ class rcube_install
// skip this property
if ($value == $default)
continue;
-
+
+ // save change
+ $this->config[$prop] = $value;
+
// replace the matching line in config file
$out = preg_replace(
'/(\$rcmail_config\[\''.preg_quote($prop).'\'\])\s+=\s+(.+);/Uie',