<commit_before><?php
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
  header("location: index.php");
  exit;
}
if (isset($module_params['pagemenu'])) {
	$pagemenu = $module_params['pagemenu'];
} elseif (isset($module_params['page'])) {
	$pagemenu = $module_params['page'];
}

if (!empty($pagemenu)) {
	if ($tikilib->page_exists($pagemenu)) {
		$info = $tikilib->get_page_info($pagemenu);
		$content = $tikilib->parse_data($info['data'], array('is_html' => $info['is_html']));
		$smarty->assign('module_title', isset($module_params['title']) ? $module_params['title'] : $pagemenu);
		$smarty->assign_by_ref('contentmenu',$content);
	}
}

?><commit_msg>[FIX]menupage: save some queries by using the cache<commit_after><?php
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false) {
  header("location: index.php");
  exit;
}
if (isset($module_params['pagemenu'])) {
	$pagemenu = $module_params['pagemenu'];
} elseif (isset($module_params['page'])) {
	$pagemenu = $module_params['page'];
}

if (!empty($pagemenu)) {
	$info = $tikilib->get_page_info($pagemenu);
	if (!empty($info)) {
		$content = $tikilib->parse_data($info['data'], array('is_html' => $info['is_html']));
		$smarty->assign('module_title', isset($module_params['title']) ? $module_params['title'] : $pagemenu);
		$smarty->assign_by_ref('contentmenu',$content);
	}
}

?>
{'fraction_non_alphanumeric': 0.22980910425844348, 'fraction_numerical': 0.0, 'mean_word_length': 8.086666666666666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, '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': '4004782', 'n_tokens_mistral': 506, 'n_tokens_neox': 501, 'n_words': 67}