Ejemplo n.º 1
0
 /**
  * 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();
 }
Ejemplo n.º 2
0
 /**
  * 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();
 }
Ejemplo n.º 3
0
 /**
  * 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();
 }