/** * calculate the final config of $this->cfg through $this->cfg default value and MbqMain::$customConfig and MbqMain::$oMbqAppEnv and the plugin support degree */ public function calCfg() { $url = WCF::getPath(); MbqMain::$oMbqAppEnv->siteRootUrl = substr($url, 0, strlen($url) - 4); //init user $oUser = DefaultUserAuthentication::getInstance()->loginAutomatically(true); if ($oUser && $oUser->userID) { MbqMain::$oMbqAppEnv->oCurrentUser = $oUser; $oMbqRdEtUser = MbqMain::$oClk->newObj('MbqRdEtUser'); $oMbqRdEtUser->initOCurMbqEtUser(); } if (MbqMain::hasLogin()) { //!!! header('Mobiquo_is_login: true'); } else { header('Mobiquo_is_login: false'); } $oMbqRdEtForum = MbqMain::$oClk->newObj('MbqRdEtForum'); MbqMain::$oMbqAppEnv->exttForumTree = $oMbqRdEtForum->getForumTree(); //!!! parent::calCfg(); /* calculate the final config */ $this->cfg['base']['sys_version']->setOriValue(PACKAGE_VERSION); if (OFFLINE) { $this->cfg['base']['is_open']->setOriValue(MbqBaseFdt::getFdt('MbqFdtConfig.base.is_open.range.no')); } else { $this->cfg['base']['is_open']->setOriValue(MbqBaseFdt::getFdt('MbqFdtConfig.base.is_open.range.yes')); } if (!MODULE_CONVERSATION || !WCF::getSession()->getPermission('user.conversation.canUseConversation')) { $this->cfg['pc']['module_enable']->setOriValue(MbqBaseFdt::getFdt('MbqFdtConfig.pc.module_enable.range.disable')); $this->cfg['pc']['conversation']->setOriValue(MbqBaseFdt::getFdt('MbqFdtConfig.pc.conversation.range.notSupport')); } }
/** * Loads the user authentication . */ protected static function loadUserAuthentication() { static::$userAuthentication = DefaultUserAuthentication::getInstance(); }