/** * Initializes the module. * This method is required by IModule. * It reads the CacheModule property. * @param TXmlElement module configuration */ public function init($config) { if ($this->_cacheModuleID === '') { throw new TConfigurationException('cachesession_cachemoduleid_required'); } else { if (($cache = $this->getApplication()->getModule($this->_cacheModuleID)) === null) { throw new TConfigurationException('cachesession_cachemodule_inexistent', $this->_cacheModuleID); } else { if ($cache instanceof ICache) { $this->_cache = $cache; } else { throw new TConfigurationException('cachesession_cachemodule_invalid', $this->_cacheModuleID); } } } $this->setUseCustomStorage(true); parent::init($config); }
} if (!is_writable($assetsPath)) { die("Please make sure that the directory {$assetsPath} is writable by Web server process."); } if (!is_writable($runtimePath)) { die("Please make sure that the directory {$runtimePath} is writable by Web server process."); } require_once $frameworkPath; if (!file_exists('./protected/runtime/.installed')) { $app_conf = new TApplicationConfiguration(); $app_conf->loadFromFile('./protected/pages/install/application.xml'); $application = new TApplication('protected', true); $application->applyConfiguration($app_conf, true); $application->run(); } else { $session = new THttpSession(); $session->open(); $application = new TApplication('protected', true); $app_conf = new TApplicationConfiguration(); $config_file = './protected/application_p.xml'; if (SAAS) { $username = ""; if (isset($_REQUEST['username'])) { $username = $_REQUEST['username']; } else { if (isset($_REQUEST['ctl0$Main$username'])) { $username = $_REQUEST['ctl0$Main$username']; } } if ($username !== "") { if (($pos = strpos($username, '@')) !== false) {