alecpl
2010-04-23 2eb7943f2aeaec8efc74b16b7bedb56da9913abf
program/include/rcube_config.php
@@ -5,7 +5,7 @@
 | program/include/rcube_config.php                                      |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2008-2009, RoundCube Dev. - Switzerland                 |
 | Copyright (C) 2008-2010, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -86,7 +86,8 @@
      if ($this->prop['log_driver'] == 'syslog') {
        ini_set('error_log', 'syslog');
      } else {
            }
            else {
        ini_set('error_log', $this->prop['log_dir'].'/errors');
      }
    }
@@ -103,7 +104,6 @@
    // export config data
    $GLOBALS['CONFIG'] = &$this->prop;
  }
  
  /**
   * Load a host-specific config file if configured
@@ -216,8 +216,7 @@
  public function get_crypto_key($key)
  {
    // Bomb out if the requested key does not exist
    if (!array_key_exists($key, $this->prop))
    {
        if (!array_key_exists($key, $this->prop)) {
      raise_error(array(
        'code' => 500, 'type' => 'php',
        'file' => __FILE__, 'line' => __LINE__,
@@ -228,12 +227,11 @@
    $key = $this->prop[$key];
  
    // Bomb out if the configured key is not exactly 24 bytes long
    if (strlen($key) != 24)
    {
        if (strlen($key) != 24) {
      raise_error(array(
        'code' => 500, 'type' => 'php',
   'file' => __FILE__, 'line' => __LINE__,
        'message' => "Configured crypto key \"$key\" is not exactly 24 bytes long"
                'message' => "Configured crypto key '$key' is not exactly 24 bytes long"
      ), true, true);
    }
@@ -251,11 +249,15 @@
    // 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')
        $php_os = strtolower(substr(PHP_OS, 0, 3));
        if ($php_os == 'win')
      return "\r\n";
    else if (strtolower(substr(PHP_OS, 0, 3)) == 'mac')
        if ($php_os == 'mac')
      return "\r\n";
    else
      return "\n";
  }
  
@@ -291,6 +293,4 @@
    return empty($this->errors) ? false : join("\n", $this->errors);
  }
}