<commit_before><?php
/**
 * @version     $Id$
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 * @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
 */

/**
 * Logout Controller Class
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/gergoerdosi>
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 */
class ComUsersControllerLogout extends ComDefaultControllerView
{
    protected function _actionLogout(KCommandContext $context)
    {
		$result = KFactory::get('lib.joomla.application')->logout();

		if(!JError::isError($result)) {
		    $this->_redirect = 'index.php?Itemid='.JSite::getMenu()->getDefault()->id;
		} else {
		    $this->setRedirect(KRequest::referrer(), $result->getError(), 'error');
		}
    }
}<commit_msg>Controller now extends from ComDefaultControllerPage<commit_after><?php
/**
 * @version     $Id$
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 * @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
 */

/**
 * Logout Controller Class
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/gergoerdosi>
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 */
class ComUsersControllerLogout extends ComDefaultControllerPage
{
    protected function _actionLogout(KCommandContext $context)
    {
		$result = KFactory::get('lib.joomla.application')->logout();

		if(!JError::isError($result)) {
		    $this->_redirect = 'index.php?Itemid='.JSite::getMenu()->getDefault()->id;
		} else {
		    $this->setRedirect(KRequest::referrer(), $result->getError(), 'error');
		}
    }
}
{'fraction_non_alphanumeric': 0.16110227874933758, 'fraction_numerical': 0.005299417064122946, 'mean_word_length': 3.59367396593674, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '5823813', 'n_tokens_mistral': 650, 'n_tokens_neox': 626, 'n_words': 110}