alecpl
2008-08-27 b77d0dd6c5574d9841cd5d040dfcc351a58ccb82
installer/rcube_install.php
@@ -100,7 +100,7 @@
   */
  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,9 +127,10 @@
      $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)
        if (isset($value))
     foreach ($value as $dbgval)
          $val += intval($dbgval);
        $value = $val;
      }
@@ -169,6 +170,9 @@
      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',