<commit_before><?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-logout.php,v 1.23 2006-12-22 02:21:20 mose Exp $

// Copyright (c) 2002-2005, <NAME>, <NAME>, <NAME>, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.

// Initialization
$bypass_siteclose_check = 'y';
require_once ('tiki-setup.php');

// go offline in Live Support
if ($feature_live_support == 'y') {
	include_once ('lib/live_support/lslib.php');

	if ($lslib->get_operator_status($user) != 'offline') {
		$lslib->set_operator_status($user, 'offline');
	}
}

setcookie($user_cookie_site, '', -3600, $cookie_path, $cookie_domain);
$userlib->user_logout($user);
$logslib->add_log('login','logged out');		
session_unregister ('user');
unset ($_SESSION[$user_cookie_site]);
session_destroy();

/* change group home page or desactivate if no page is set */
$groupHome = $userlib->get_group_home('Anonymous');
if ($groupHome) {
    if (preg_match('#^https?:#', $groupHome) || preg_match('/^tiki-.+\.php/',$groupHome)) {
	$tikiIndex = $groupHome;
    } else {
	$tikiIndex = "tiki-index.php?page=".$groupHome;
    }
} else {
    $tikiIndex = $tikilib->get_preference("tikiIndex",'tiki-index.php'); 
}

if ($phpcas_enabled == 'y' and $user != 'admin') {
	require_once('phpcas/source/CAS/CAS.php');
	phpCAS::client($cas_version, "$cas_hostname", (int) $cas_port, "$cas_path");
	phpCAS::logout();
}

header ("location: $tikiIndex");
exit;
?><commit_msg>[FIX]login: call the cas lib if method allowed and not only the file exists<commit_after><?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-logout.php,v 1.24 2007-01-22 16:04:57 sylvieg Exp $

// Copyright (c) 2002-2005, <NAME>, <NAME>, <NAME>, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.

// Initialization
$bypass_siteclose_check = 'y';
require_once ('tiki-setup.php');

// go offline in Live Support
if ($feature_live_support == 'y') {
	include_once ('lib/live_support/lslib.php');

	if ($lslib->get_operator_status($user) != 'offline') {
		$lslib->set_operator_status($user, 'offline');
	}
}

setcookie($user_cookie_site, '', -3600, $cookie_path, $cookie_domain);
$userlib->user_logout($user);
$logslib->add_log('login','logged out');		
session_unregister ('user');
unset ($_SESSION[$user_cookie_site]);
session_destroy();

/* change group home page or desactivate if no page is set */
$groupHome = $userlib->get_group_home('Anonymous');
if ($groupHome) {
    if (preg_match('#^https?:#', $groupHome) || preg_match('/^tiki-.+\.php/',$groupHome)) {
	$tikiIndex = $groupHome;
    } else {
	$tikiIndex = "tiki-index.php?page=".$groupHome;
    }
} else {
    $tikiIndex = $tikilib->get_preference("tikiIndex",'tiki-index.php'); 
}

if ($phpcas_enabled == 'y' and $tikilib->get_preference('auth_method', 'tiki') == 'cas' and $user != 'admin') {
	require_once('phpcas/source/CAS/CAS.php');
	phpCAS::client($cas_version, "$cas_hostname", (int) $cas_port, "$cas_path");
	phpCAS::logout();
}

header ("location: $tikiIndex");
exit;
?>
{'fraction_non_alphanumeric': 0.18804755944931165, 'fraction_numerical': 0.018147684605757195, 'mean_word_length': 5.195736434108527, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6160746', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1157, 'n_words': 251}