<commit_before><?php

//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER['SCRIPT_NAME'],basename(__FILE__)) !== false) {
  header('location: index.php');
  exit;
}

if (!$user) {
	$smarty->assign('tpl_module_title', tra('Webmail error'));
	$smarty->assign('error', 'You are not logged in');
	return;	// modules cannot "exit", they must "return" to keep tiki alive
}

if ($prefs['feature_webmail'] != 'y') {
	$smarty->assign('tpl_module_title', tra('Webmail error'));<commit_msg>[FIX] Quick fix for missing prefs global (pending proper convertion to the new modules regime)<commit_after><?php

//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER['SCRIPT_NAME'],basename(__FILE__)) !== false) {
  header('location: index.php');
  exit;
}

if (!$user) {
	$smarty->assign('tpl_module_title', tra('Webmail error'));
	$smarty->assign('error', 'You are not logged in');
	return;	// modules cannot "exit", they must "return" to keep tiki alive
}

global $prefs;
if ($prefs['feature_webmail'] != 'y') {
	$smarty->assign('tpl_module_title', tra('Webmail error'));
{'fraction_non_alphanumeric': 0.17452006980802792, 'fraction_numerical': 0.0, 'mean_word_length': 5.630057803468208, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '750409', 'n_tokens_mistral': 371, 'n_tokens_neox': 374, 'n_words': 115}