- // load host-specific configuration
- $this->load_host_config();
-
- // set skin (with fallback to old 'skin_path' property)
- if (empty($this->prop['skin']) && !empty($this->prop['skin_path']))
- $this->prop['skin'] = str_replace('skins/', '', unslashify($this->prop['skin_path']));
- else if (empty($this->prop['skin']))
- $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';
-
- // 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');
-
- if (!empty($this->prop['default_imap_folders']))
- foreach ($this->prop['default_imap_folders'] as $n => $folder)
- $this->prop['default_imap_folders'][$n] = rcube_charset_convert($folder, RCMAIL_CHARSET, 'UTF7-IMAP');
-
- // set PHP error logging according to config
- if ($this->prop['debug_level'] & 1) {
- ini_set('log_errors', 1);
-
- if ($this->prop['log_driver'] == 'syslog') {
- ini_set('error_log', 'syslog');
- } else {
- ini_set('error_log', $this->prop['log_dir'].'/errors');
- }
+ // 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');
+
+ if (!empty($this->prop['default_imap_folders']))
+ foreach ($this->prop['default_imap_folders'] as $n => $folder)
+ $this->prop['default_imap_folders'][$n] = rcube_charset_convert($folder, RCMAIL_CHARSET, 'UTF7-IMAP');
+
+ // set PHP error logging according to config
+ if ($this->prop['debug_level'] & 1) {
+ ini_set('log_errors', 1);
+
+ if ($this->prop['log_driver'] == 'syslog') {
+ ini_set('error_log', 'syslog');
+ }
+ else {
+ ini_set('error_log', $this->prop['log_dir'].'/errors');
+ }
+ }
+ if ($this->prop['debug_level'] & 4) {
+ ini_set('display_errors', 1);
+ }
+ else {
+ ini_set('display_errors', 0);
+ }
+
+ // export config data
+ $GLOBALS['CONFIG'] = &$this->prop;