<commit_before><?php
/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines
 * @copyright 2013 Simple Machines and individual contributors
 * @license http://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.1 Alpha 1
 */

function template_main()
{
	global $context, $settings, $options;
}

function template_view_package()
{
	global $context, $settings, $options, $txt, $scripturl, $smcFunc;

	echo '
	<div id="admincenter">
		<div class="cat_bar">
			<h3 class="catbg">', $txt[($context['uninstalling'] ? 'un' : '') . 'install_mod'], '</h3>
		</div>
		<div class="information">';

	if ($context['is_installed'])
		echo '
			<strong>', $txt['package_installed_warning1'], '</strong><br />
			<br />
			', $txt['package_installed_warning2'], '<br />
			<br />';

	echo $txt['package_installed_warning3'], '
		</div>';

	// Do errors exist in the install? If so light them up like a christmas tree.
	if ($context['has_failure'])
	{
		echo '
		<div class="errorbox">
			', sprintf($txt['package_will_fail_title'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]), '<br />
			', sprintf($txt['package_will_fail_warning'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]),
			!empty($context['failure_details']) ? '<br /><br /><strong>' . $context['failure_details'] . '</strong>' : '', '
		</div>';
	}

	// Display the package readme if one exists
	if (isset($context['package_readme']))
	{
		echo '
			<div class="cat_bar">
				<h3 class="catbg">', $txt['package_' . ($context['uninstalling'] ? 'un' : '') . 'install_readme'], '</h3>
			</div>
			<div class="windowbg2">
				<div class="content">
					', $context['package_readme'], '
					<span class="floatright">', $txt['package_available_readme_language'], '
						<select name="readme_language" id="readme_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', ';package=', $context['filename'], ';readme=\' + this.options[this.selectedIndex].value + \';license=\' + get_selected(\'license_language\'));">';
							foreach ($context['readmes'] as $a => $b)
								echo '<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>';
			echo '
						</select>
					</span>
				</div>
			</div>
			<br />';
	}

	// Did they specify a license to display?
	if (isset($context['package_license']))
	{
		echo '
			<div class="cat_bar">
				<h3 class="catbg">', $txt['package_install_license'], '</h3>
			</div>
			<div class="windowbg2">
				<div class="content">
					', $context['package_license'], '
					<span class="floatright">', $txt['package_available_license_language'], '
						<select name="license_language" id="license_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=install', ';package=', $context['filename'], ';license=\' + this.options[this.selectedIndex].value + \';readme=\' + get_selected(\'readme_language\'));">';
							foreach ($context['licenses'] as $a => $b)
								echo '<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>';
			echo '
						</select>
					</span>
				</div>
			</div>
			<br />';
	}

	echo '
		<form action="', $context['post_url'], '" onsubmit="submitonce(this);" method="post" accept-charset="', $context['character_set'], '">
			<div class="cat_bar">
				<h3 class="catbg">
					', $context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package_install_actions'], ' &quot;', $context['package_name'], '&quot;
				</h3>
			</div>';

	// Are there data changes to be removed?
	if ($context['uninstalling'] && !empty($context['database_changes']))
	{
		echo '
			<div class="windowbg2">
				<div class="content">
					<label for="do_db_changes"><input type="checkbox" name="do_db_changes" id="do_db_changes" class="input_check" />', $txt['package_db_uninstall'], '</label> [<a href="#" onclick="return swap_database_changes();">', $txt['package_db_uninstall_details'], '</a>]
					<div id="db_changes_div">
						', $txt['package_db_uninstall_actions'], ':
						<ul>';

		foreach ($context['database_changes'] as $change)
			echo '
							<li>', $change, '</li>';
		echo '
						</ul>
					</div>
				</div>
			</div>';
	}

	echo '
			<div class="information">';

	if (empty($context['actions']) && empty($context['database_changes']))
		echo '
				<br />
				<div class="errorbox">
					', $txt['corrupt_compatible'], '
				</div>
			</div>';
	else
	{
		echo '
					', $txt['perform_actions'], '
			</div>
			<table class="table_grid" width="100%">
			<thead>
				<tr class="catbg">
					<th class="first_th" scope="col" width="20"></th>
					<th scope="col" width="30"></th>
					<th scope="col" class="lefttext">', $txt['package_install_type'], '</th>
					<th scope="col" class="lefttext" width="50%">', $txt['package_install_action'], '</th>
					<th class="last_th lefttext" scope="col" width="20%">', $txt['package_install_desc'], '</th>
				</tr>
			</thead>
			<tbody>';

		$alternate = true;
		$i = 1;<commit_msg>! Missing spacing between chunks of exciting content (thanks @Yoshi2889 for the heads-up)<commit_after><?php
/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines
 * @copyright 2013 Simple Machines and individual contributors
 * @license http://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.1 Alpha 1
 */

function template_main()
{
	global $context, $settings, $options;
}

function template_view_package()
{
	global $context, $settings, $options, $txt, $scripturl, $smcFunc;

	echo '
	<div id="admincenter">
		<div class="cat_bar">
			<h3 class="catbg">', $txt[($context['uninstalling'] ? 'un' : '') . 'install_mod'], '</h3>
		</div>
		<div class="information">';

	if ($context['is_installed'])
		echo '
			<strong>', $txt['package_installed_warning1'], '</strong><br />
			<br />
			', $txt['package_installed_warning2'], '<br />
			<br />';

	echo $txt['package_installed_warning3'], '
		</div><br />';

	// Do errors exist in the install? If so light them up like a christmas tree.
	if ($context['has_failure'])
	{
		echo '
		<div class="errorbox">
			', sprintf($txt['package_will_fail_title'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]), '<br />
			', sprintf($txt['package_will_fail_warning'], $txt['package_' . ($context['uninstalling'] ? 'uninstall' : 'install')]),
			!empty($context['failure_details']) ? '<br /><br /><strong>' . $context['failure_details'] . '</strong>' : '', '
		</div>';
	}

	// Display the package readme if one exists
	if (isset($context['package_readme']))
	{
		echo '
			<div class="cat_bar">
				<h3 class="catbg">', $txt['package_' . ($context['uninstalling'] ? 'un' : '') . 'install_readme'], '</h3>
			</div>
			<div class="windowbg2">
				<div class="content">
					', $context['package_readme'], '
					<span class="floatright">', $txt['package_available_readme_language'], '
						<select name="readme_language" id="readme_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', ';package=', $context['filename'], ';readme=\' + this.options[this.selectedIndex].value + \';license=\' + get_selected(\'license_language\'));">';
							foreach ($context['readmes'] as $a => $b)
								echo '<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>';
			echo '
						</select>
					</span>
				</div>
			</div>
			<br />';
	}

	// Did they specify a license to display?
	if (isset($context['package_license']))
	{
		echo '
			<div class="cat_bar">
				<h3 class="catbg">', $txt['package_install_license'], '</h3>
			</div>
			<div class="windowbg2">
				<div class="content">
					', $context['package_license'], '
					<span class="floatright">', $txt['package_available_license_language'], '
						<select name="license_language" id="license_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=install', ';package=', $context['filename'], ';license=\' + this.options[this.selectedIndex].value + \';readme=\' + get_selected(\'readme_language\'));">';
							foreach ($context['licenses'] as $a => $b)
								echo '<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>';
			echo '
						</select>
					</span>
				</div>
			</div>
			<br />';
	}

	echo '
		<form action="', $context['post_url'], '" onsubmit="submitonce(this);" method="post" accept-charset="', $context['character_set'], '">
			<div class="cat_bar">
				<h3 class="catbg">
					', $context['uninstalling'] ? $txt['package_uninstall_actions'] : $txt['package_install_actions'], ' &quot;', $context['package_name'], '&quot;
				</h3>
			</div>';

	// Are there data changes to be removed?
	if ($context['uninstalling'] && !empty($context['database_changes']))
	{
		echo '
			<div class="windowbg2">
				<div class="content">
					<label for="do_db_changes"><input type="checkbox" name="do_db_changes" id="do_db_changes" class="input_check" />', $txt['package_db_uninstall'], '</label> [<a href="#" onclick="return swap_database_changes();">', $txt['package_db_uninstall_details'], '</a>]
					<div id="db_changes_div">
						', $txt['package_db_uninstall_actions'], ':
						<ul>';

		foreach ($context['database_changes'] as $change)
			echo '
							<li>', $change, '</li>';
		echo '
						</ul>
					</div>
				</div>
			</div>';
	}

	echo '
			<div class="information">';

	if (empty($context['actions']) && empty($context['database_changes']))
		echo '
				<br />
				<div class="errorbox">
					', $txt['corrupt_compatible'], '
				</div>
			</div>';
	else
	{
		echo '
					', $txt['perform_actions'], '
			</div><br />
			<table class="table_grid" width="100%">
			<thead>
				<tr class="catbg">
					<th class="first_th" scope="col" width="20"></th>
					<th scope="col" width="30"></th>
					<th scope="col" class="lefttext">', $txt['package_install_type'], '</th>
					<th scope="col" class="lefttext" width="50%">', $txt['package_install_action'], '</th>
					<th class="last_th lefttext" scope="col" width="20%">', $txt['package_install_desc'], '</th>
				</tr>
			</thead>
			<tbody>';

		$alternate = true;
		$i = 1;
{'fraction_non_alphanumeric': 0.22358022422348833, 'fraction_numerical': 0.006432641058628928, 'mean_word_length': 4.403674280039722, 'pattern_counts': {'":': 0, '<': 191, '<?xml version=': 0, '>': 193, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1670124', 'n_tokens_mistral': 4267, 'n_tokens_neox': 3661, 'n_words': 721}