|
|
|
@ -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 @@ class rcube_config
|
|
|
|
|
|
|
|
|
|
if ($this->prop['log_driver'] == 'syslog') {
|
|
|
|
|
ini_set('error_log', 'syslog');
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
ini_set('error_log', $this->prop['log_dir'].'/errors');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -104,7 +105,6 @@ class rcube_config
|
|
|
|
|
$GLOBALS['CONFIG'] = &$this->prop;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Load a host-specific config file if configured
|
|
|
|
|
* This will merge the host specific configuration with the given one
|
|
|
|
@ -216,8 +216,7 @@ class rcube_config
|
|
|
|
|
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 @@ class rcube_config
|
|
|
|
|
$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 @@ class rcube_config
|
|
|
|
|
// 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 @@ class rcube_config
|
|
|
|
|
return empty($this->errors) ? false : join("\n", $this->errors);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|