<commit_before><?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
// 
// 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.
// $Id$

$inputConfiguration = array(
	array('staticKeyFilters' => array(
		'email' => 'email',
		'name' => 'text',
		'pass' => 'text',
		'passAgain' => 'text',
	))
);

$auto_query_args = array();

require_once ('tiki-setup.php');

ask_ticket('register');

if (isset($redirect) && !empty($redirect)) {
	header('Location: '.$redirect);
	exit;
}

// disallow robots to index page:
$smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');

if ($prefs['allowRegister'] != 'y') {
	header("location: index.php");
	die;
}

global $user, $prefs;
if (!empty($prefs['feature_alternate_registration_page'])) {
	header("location: " . $prefs['feature_alternate_registration_page']);
	die;
}
$smarty->assign('user_exists', TikiLib::lib('user')->user_exists($user));

$re = $userlib->get_group_info(isset($_REQUEST['chosenGroup']) ? $_REQUEST['chosenGroup'] : 'Registered');
$tr = TikiLib::lib('trk')->get_tracker($re['usersTrackerId']);
if (!empty($tr['description'])) {
	$smarty->assign('userTrackerHasDescription', true);
}

$smarty->assign('mid', 'tiki-register.tpl');
$smarty->display('tiki.tpl');<commit_msg>[FIX] registration: Prevent extraordinary endless redirect loop when feature_alternate_registration_page is set to it's default (be very careful updating production sites to 9.x at the moment!)<commit_after><?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
// 
// 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.
// $Id$

$inputConfiguration = array(
	array('staticKeyFilters' => array(
		'email' => 'email',
		'name' => 'text',
		'pass' => 'text',
		'passAgain' => 'text',
	))
);

$auto_query_args = array();

require_once ('tiki-setup.php');

ask_ticket('register');

if (isset($redirect) && !empty($redirect)) {
	header('Location: '.$redirect);
	exit;
}

// disallow robots to index page:
$smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');

if ($prefs['allowRegister'] != 'y') {
	header("location: index.php");
	die;
}

global $user, $prefs;
if (!empty($prefs['feature_alternate_registration_page']) && $prefs['feature_alternate_registration_page'] !== 'tiki-register.php') {
	header("location: " . $prefs['feature_alternate_registration_page']);
	die;
}
$smarty->assign('user_exists', TikiLib::lib('user')->user_exists($user));

$re = $userlib->get_group_info(isset($_REQUEST['chosenGroup']) ? $_REQUEST['chosenGroup'] : 'Registered');
$tr = TikiLib::lib('trk')->get_tracker($re['usersTrackerId']);
if (!empty($tr['description'])) {
	$smarty->assign('userTrackerHasDescription', true);
}

$smarty->assign('mid', 'tiki-register.tpl');
$smarty->display('tiki.tpl');
{'fraction_non_alphanumeric': 0.19152485819152487, 'fraction_numerical': 0.005672339005672339, 'mean_word_length': 6.206730769230769, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '463168', 'n_tokens_mistral': 1034, 'n_tokens_neox': 991, 'n_words': 223}