/** * @param string $sSettingsPath * * @return api_Settings */ public function __construct($sSettingsPath) { $this->aMap = array(); $this->aLowerMap = array(); $this->aObjectsMap = array(); $this->aContainer = array(); $this->sPath = $sSettingsPath; $this->initDefaultValues(); if (!$this->LoadFromXml($this->sPath . api_Settings::XML_FILE_NAME)) { if ($this->LoadFromXml($this->sPath . api_Settings::XML_FILE_NAME . '.bak')) { copy($this->sPath . api_Settings::XML_FILE_NAME . '.bak', $this->sPath . api_Settings::XML_FILE_NAME); } else { throw new CApiBaseException(Errs::Main_SettingLoadError); } } if (!api_Utils::hasSslSupport()) { $this->SetConf('WebMail/IncomingMailUseSSL', false); $this->SetConf('WebMail/OutgoingMailUseSSL', false); } if (file_exists(CApi::RootPath() . 'common/lite.php')) { include_once CApi::RootPath() . 'common/lite.php'; } $this->SetConf('WebMail/IncomingMailProtocol', EMailProtocol::IMAP4); }
/** * @return bool */ public function hasSslSupport() { return api_Utils::hasSslSupport(); }