<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$

// 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;
}

$parserlib = TikiLib::lib('parser');

$plugins = array();
foreach ($parserlib->plugin_get_list() as $name) {
	$info = $parserlib->plugin_info($name);
	if (isset($info['prefs']) && is_array($info['prefs']) && count($info['prefs']) > 0) $plugins[$name] = $info;
}
$smarty->assign('plugins', $plugins);
if (isset($_REQUEST['textareasetup']) && (!isset($_COOKIE['tab']) || $_COOKIE['tab'] != 3)) { // tab=3 is plugins alias tab (TODO improve)
	ask_ticket('admin-inc-textarea');
	foreach (glob('temp/cache/wikiplugin_*') as $file) unlink($file);
}

$cookietab = 1;

// from tiki-admin_include_textarea.php
global $tikilib;
$pluginsAlias = $parserlib->plugin_get_list(false, true);
$pluginsReal = $parserlib->plugin_get_list(true, false);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
	global $cachelib;
	require_once ('lib/cache/cachelib.php');
	$areanames = array(
		'editwiki',
		'editpost',
		'editpost2',
		'blogedit',
		'faqans',
		'body',
		'description',
		'trackerDescription'
	);
	foreach ($tikilib->list_languages() as $tlang) {
		foreach ($areanames as $an) {<commit_msg>[FIX] plugin alias: Another reference to $_COOKIE['tab']<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$

// 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;
}

$parserlib = TikiLib::lib('parser');

$plugins = array();
foreach ($parserlib->plugin_get_list() as $name) {
	$info = $parserlib->plugin_info($name);
	if (isset($info['prefs']) && is_array($info['prefs']) && count($info['prefs']) > 0) $plugins[$name] = $info;
}
$smarty->assign('plugins', $plugins);
if (isset($_REQUEST['textareasetup']) && (getCookie('admin_textarea', 'tabs') == 3)) { // tab=3 is plugins alias tab (TODO improve)
	ask_ticket('admin-inc-textarea');
	foreach (glob('temp/cache/wikiplugin_*') as $file) unlink($file);
}

$cookietab = 1;

// from tiki-admin_include_textarea.php
global $tikilib;
$pluginsAlias = $parserlib->plugin_get_list(false, true);
$pluginsReal = $parserlib->plugin_get_list(true, false);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
	global $cachelib;
	require_once ('lib/cache/cachelib.php');
	$areanames = array(
		'editwiki',
		'editpost',
		'editpost2',
		'blogedit',
		'faqans',
		'body',
		'description',
		'trackerDescription'
	);
	foreach ($tikilib->list_languages() as $tlang) {
		foreach ($areanames as $an) {
{'fraction_non_alphanumeric': 0.1801916932907348, 'fraction_numerical': 0.008306709265175719, 'mean_word_length': 5.3638211382113825, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7455763', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1052, 'n_words': 274}