<commit_before><commit_msg>re #141 : Added dispatcher to force application state to 'site' if not defined in the request for 'modules' view.<commit_after><?php
/**
 * @version     $Id$
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Extensions
 * @copyright   Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Dispatcher Class
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Pages
 */

class ComExtensionsDispatcher extends ComDefaultDispatcher
{
	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);
	}
}
{'fraction_non_alphanumeric': 0.15092748735244518, 'fraction_numerical': 0.006745362563237774, 'mean_word_length': 3.093103448275862, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4821410', 'n_tokens_mistral': 399, 'n_tokens_neox': 368, 'n_words': 77}