/** * Be careful when making some changes to this function. * It indirectly validates GET input. */ protected function initCurrentControllerName() { $moduleName = CoreServices::get('request')->getFromGet('_m'); if (empty($moduleName)) { $moduleName = CoreConfig::get('Structure', 'defaultModule'); } $modeName = CoreServices::get('request')->getFromGet('_o'); if (empty($modeName)) { $modeName = CoreConfig::get('Structure', 'defaultMode'); } if (!file_exists(CoreAutoload::getClassPath($this->getControllerClass($moduleName, $modeName)))) { $moduleName = CoreConfig::get('Structure', 'defaultModule'); $modeName = CoreConfig::get('Structure', 'defaultMode'); } $this->currentModule = $moduleName; $this->currentMode = $modeName; }
function __autoload($className) { require_once CoreAutoload::getClassPath($className); }