protected function _actionDispatch(KCommandContext $context)
 {
     if (!JFactory::getUser()->guest) {
         //Redirect if user is already logged in
         if ($this->getRequest()->view == 'login') {
             JFactory::getApplication()->redirect('index.php');
         }
     }
     return parent::_actionDispatch($context);
 }
Example #2
0
 protected function _actionDispatch(KCommandContext $context)
 {
     if (KRequest::method() == KHttpRequest::GET) {
         $view = KRequest::get('get.view', 'cmd', $this->_controller);
         if ($view == 'modules' && !KRequest::has('get.application')) {
             $url = clone KRequest::url();
             $url->query['application'] = 'site';
             JFactory::getApplication()->redirect($url);
         }
     }
     return parent::_actionDispatch($context);
 }
 protected function _actionDispatch(KCommandContext $context)
 {
     if ($this->_request->routed) {
         // Work-around the bug here: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28249
         // TODO: Move this to the Nooku Framework plugin
         JFactory::getSession()->set('com_fileman.fix.the.session.bug', microtime(true));
         // Use our own ACL instead of com_files'
         KService::setAlias('com://admin/files.controller.behavior.executable', 'com://admin/fileman.controller.behavior.executable');
         $context->result = $this->getService('com://admin/files.dispatcher')->dispatch();
         return $context->result;
     }
     return parent::_actionDispatch($context);
 }
Example #4
0
	protected function _actionDispatch(KCommandContext $context)
	{
		$view = KRequest::get('get.view', 'cmd', $this->_controller);

		if($view == 'pages' && !KRequest::has('get.menu'))
		{
			$page = KFactory::get('com://admin/pages.model.pages')->home(1)->getList()->top();
			
			$url = clone(KRequest::url());
            $url->query['view']   = $view;
            $url->query['menu']  = $page->pages_menu_id;
           
            KFactory::get('joomla:application')->redirect($url);
		}
	
		return parent::_actionDispatch($context);
	}