| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | program/include/rcube_config.php | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2008-2012, The Roundcube Dev Team | |
| | | | | |
| | |
| | | | | |
| | | | PURPOSE: | |
| | | | Class to read configuration settings | |
| | | | | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | +-----------------------------------------------------------------------+ |
| | |
| | | private function load() |
| | | { |
| | | // load main config file |
| | | if (!$this->load_from_file(RCUBE_CONFIG_DIR . '/main.inc.php')) |
| | | if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'main.inc.php')) |
| | | $this->errors[] = 'main.inc.php was not found.'; |
| | | |
| | | // load database config |
| | | if (!$this->load_from_file(RCUBE_CONFIG_DIR . '/db.inc.php')) |
| | | if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'db.inc.php')) |
| | | $this->errors[] = 'db.inc.php was not found.'; |
| | | |
| | | // load host-specific configuration |
| | |
| | | |
| | | // 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'); |
| | | $this->prop[$folder] = rcube_charset::convert($this->prop[$folder], RCUBE_CHARSET, 'UTF7-IMAP'); |
| | | |
| | | if (!empty($this->prop['default_folders'])) |
| | | foreach ($this->prop['default_folders'] as $n => $folder) |
| | | $this->prop['default_folders'][$n] = rcube_charset::convert($folder, RCMAIL_CHARSET, 'UTF7-IMAP'); |
| | | $this->prop['default_folders'][$n] = rcube_charset::convert($folder, RCUBE_CHARSET, 'UTF7-IMAP'); |
| | | |
| | | // set PHP error logging according to config |
| | | if ($this->prop['debug_level'] & 1) { |
| | |
| | | } |
| | | |
| | | if ($fname) { |
| | | $this->load_from_file(RCUBE_CONFIG_DIR . '/' . $fname); |
| | | $this->load_from_file(RCUBE_CONFIG_DIR . $fname); |
| | | } |
| | | } |
| | | |