alecpl
2009-12-09 e5d60d69d4108a0e62270548117773244ca1905e
program/include/rcube_config.php
@@ -68,9 +68,9 @@
      $this->prop['skin'] = 'default';
    // fix paths
    $this->prop['log_dir'] = $this->prop['log_dir'] ? unslashify($this->prop['log_dir']) : INSTALL_PATH . 'logs';
    $this->prop['temp_dir'] = $this->prop['temp_dir'] ? unslashify($this->prop['temp_dir']) : INSTALL_PATH . 'temp';
    $this->prop['log_dir'] = $this->prop['log_dir'] ? realpath(unslashify($this->prop['log_dir'])) : INSTALL_PATH . 'logs';
    $this->prop['temp_dir'] = $this->prop['temp_dir'] ? realpath(unslashify($this->prop['temp_dir'])) : INSTALL_PATH . 'temp';
    // fix default imap folders encoding
    foreach (array('drafts_mbox', 'junk_mbox', 'sent_mbox', 'trash_mbox') as $folder)
      $this->prop[$folder] = rcube_charset_convert($this->prop[$folder], RCMAIL_CHARSET, 'UTF7-IMAP');
@@ -132,12 +132,12 @@
   * @param string Full path to the config file to be loaded
   * @return booelan True on success, false on failure
   */
  public function load_from_file($fpath)
  public function load_from_file($fpath, $merge = true)
  {
    if (is_file($fpath) && is_readable($fpath)) {
      include($fpath);
      if (is_array($rcmail_config)) {
        $this->prop = array_merge($this->prop, $rcmail_config);
        $this->prop = $merge ? array_merge($this->prop, $rcmail_config) : $this->prop + $rcmail_config;
        return true;
      }
    }