alecpl
2009-11-23 c96c5a98af8b9374010ebb692c89f82d67faf72e
program/include/rcube_config.php
@@ -70,7 +70,6 @@
    // 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['plugins_dir'] = $this->prop['plugins_dir'] ? unslashify($this->prop['plugins_dir']) : INSTALL_PATH . 'plugins';
    // fix default imap folders encoding
    foreach (array('drafts_mbox', 'junk_mbox', 'sent_mbox', 'trash_mbox') as $folder)
@@ -133,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)) {
      @include($fpath);
    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;
      }
    }
@@ -238,9 +237,9 @@
    // use the configured delimiter for headers
    if (!empty($this->prop['mail_header_delimiter']))
      return $this->prop['mail_header_delimiter'];
    else if (strtolower(substr(PHP_OS, 0, 3) == 'win'))
    else if (strtolower(substr(PHP_OS, 0, 3)) == 'win')
      return "\r\n";
    else if (strtolower(substr(PHP_OS, 0, 3) == 'mac'))
    else if (strtolower(substr(PHP_OS, 0, 3)) == 'mac')
      return "\r\n";
    else
      return "\n";