| | |
| | | */ |
| | | private function load() |
| | | { |
| | | // load main config file |
| | | if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'main.inc.php')) |
| | | $this->errors[] = 'main.inc.php was not found.'; |
| | | // Load default settings |
| | | if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'defaults.inc.php')) { |
| | | $this->errors[] = 'defaults.inc.php was not found.'; |
| | | } |
| | | |
| | | // load database config |
| | | if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'db.inc.php')) |
| | | $this->errors[] = 'db.inc.php was not found.'; |
| | | // load main config file |
| | | if (!$this->load_from_file(RCUBE_CONFIG_DIR . 'config.inc.php')) { |
| | | $this->errors[] = 'config.inc.php was not found.'; |
| | | |
| | | // Old configuration files |
| | | $this->load_from_file(RCUBE_CONFIG_DIR . 'main.inc.php'); |
| | | $this->load_from_file(RCUBE_CONFIG_DIR . 'db.inc.php'); |
| | | } |
| | | |
| | | // load host-specific configuration |
| | | $this->load_host_config(); |
| | |
| | | include($fpath); |
| | | ob_end_clean(); |
| | | |
| | | if (is_array($rcmail_config)) { |
| | | if (is_array($config)) { |
| | | $this->merge($config); |
| | | return true; |
| | | } |
| | | // deprecated name of config variable |
| | | else if (is_array($rcmail_config)) { |
| | | $this->merge($rcmail_config); |
| | | return true; |
| | | } |