<commit_before><?php
/**
 * @package        Local_redirect
 * @category       plugins
 * @author         <NAME> <<EMAIL>>
 * @copyright      Copyright (c) 2011-2013, <NAME>
 * @license        MIT License, see license.txt
 */
namespace	cs;
Trigger::instance()->register(
	'System/User/construct/after',
	function () {
		if (MODULE == 'System' || !in_array('Local_redirect', Config::instance()->components['plugins'])) {
			return;
		}
		if (!in_array(substr($_SERVER['REQUEST_URI'], 1, 2), ['en', 'ru', 'uk'])) {
			header('Location: /'.Language::instance()->clang.'/'.trim($_SERVER['REQUEST_URI'], '/'), true, 301);
		}
	}
);<commit_msg>Removed trailing slash during redirect<commit_after><?php
/**
 * @package        Local_redirect
 * @category       plugins
 * @author         <NAME> <<EMAIL>>
 * @copyright      Copyright (c) 2011-2013, <NAME>
 * @license        MIT License, see license.txt
 */
namespace	cs;
Trigger::instance()->register(
	'System/User/construct/after',
	function () {
		if (MODULE == 'System' || !in_array('Local_redirect', Config::instance()->components['plugins'])) {
			return;
		}
		if (!in_array(substr($_SERVER['REQUEST_URI'], 1, 2), ['en', 'ru', 'uk'])) {
			header('Location: /'.trim(Language::instance()->clang.'/'.trim($_SERVER['REQUEST_URI'], '/'), '/'), true, 301);
		}
	}
);
{'fraction_non_alphanumeric': 0.2183206106870229, 'fraction_numerical': 0.01984732824427481, 'mean_word_length': 3.9471698113207547, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '4220319', 'n_tokens_mistral': 449, 'n_tokens_neox': 409, 'n_words': 84}