| | |
| | | | 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: | |
| | |
| | | |
| | | if ($this->prop['log_driver'] == 'syslog') { |
| | | ini_set('error_log', 'syslog'); |
| | | } else { |
| | | } |
| | | else { |
| | | ini_set('error_log', $this->prop['log_dir'].'/errors'); |
| | | } |
| | | } |
| | |
| | | // export config data |
| | | $GLOBALS['CONFIG'] = &$this->prop; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Load a host-specific config file if configured |
| | |
| | | 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__, |
| | |
| | | $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); |
| | | } |
| | | |
| | |
| | | // 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"; |
| | | } |
| | | |
| | |
| | | return empty($this->errors) ? false : join("\n", $this->errors); |
| | | } |
| | | |
| | | |
| | | } |
| | | |