/** * Routers * * @param KCommandContext $context Dispatcher context * * @return void */ protected function _actionRoute(KCommandContext $context) { parent::_actionRoute($context); $component = $context->request->get('option'); if (empty($component)) { $context->request->set('option', 'com_application'); } $this->dispatch(); }
/** * Router action * * @param KCommandContext $context */ protected function _actionRoute(KCommandContext $context) { //legacy if (KRequest::has('post.option')) { KRequest::set('get.option', KRequest::get('post.option', 'cmd')); } parent::_actionRoute($context); $component = $this->getRequest()->get('option'); $user =& JFactory::getUser(); if (!$user->authorize('login', 'administrator')) { $component = 'com_login'; } if (empty($component)) { $component = 'com_cpanel'; } $this->getRequest()->set('option', $component); JRequest::set($this->getRequest()->toArray(), 'get'); $this->setComponent(substr($component, 4)); $this->dispatch(); }
/** * Router action. * * @param KCommandContext $context */ protected function _actionRoute(KCommandContext $context) { //legacy if (KRequest::has('post.option')) { KRequest::set('get.option', KRequest::get('post.option', 'cmd')); } parent::_actionRoute($context); $component = $this->getRequest()->get('option'); if (get_viewer()->guest()) { $component = 'com_login'; } elseif (empty($component)) { $component = 'com_cpanel'; } $this->getRequest()->set('option', $component); JRequest::set($this->getRequest()->toArray(), 'get'); $this->setComponent(substr($component, 4)); $this->dispatch(); }