<commit_before><?php include('header.php'); ?>
<div class="container">
<hr>
	<div class="">
		<h1><?php _e('Import'); ?></h1>
		<form method="post" action="">
			<?php
			if(empty($_POST['importer'])) :
				$import_names= array();
				$import_names= Plugins::filter('import_names', $import_names);
				if(count($import_names) == 0):
				?>
				<p><?php _e('You do not currently have any import plugins installed.'); ?></p>
				<p><?php _e('Please '); ?><a href="<?php URL::out('admin', 'page=plugins'); ?>"><?php _e('activate an import plugin</a> to enable importing.'); ?></p>
				<?php else: ?>
				<p><?php _e('Please choose the type of import to perform:'); ?></p>
				<select name="importer">
					<option></option>
					<?php
					foreach($import_names as $name) {
						echo "<option>{$name}</option>";
					}
					?>
				</select>
				<p class="submit"><input type="submit" name="import" value="<?php _e('Select'); ?>"></p>
			<?php
				endif;
			else:
				echo Plugins::filter('import_stage', '', @$_POST['importer'], @$_POST['stage'], @$_POST['step']);
			?>
			<?php
			endif;
			if(isset($_POST['importer'])) {
				echo '<input type="hidden" name="importer" value="' . $_POST['importer'] . '">';
			}
			?>
		</form>

	</div>
</div>
<?php
// unset the $db_connection variable, since we don't need it any more
unset( $db_connection );
?>
<?php include('footer.php'); ?>
<commit_msg>Remove blank option from the importer select. Fixes ticket #541.<commit_after><?php include('header.php'); ?>
<div class="container">
<hr>
	<div class="">
		<h1><?php _e('Import'); ?></h1>
		<form method="post" action="">
			<?php
			if(empty($_POST['importer'])) :
				$import_names= array();
				$import_names= Plugins::filter('import_names', $import_names);
				if(count($import_names) == 0):
				?>
				<p><?php _e('You do not currently have any import plugins installed.'); ?></p>
				<p><?php _e('Please '); ?><a href="<?php URL::out('admin', 'page=plugins'); ?>"><?php _e('activate an import plugin</a> to enable importing.'); ?></p>
				<?php else: ?>
				<p><?php _e('Please choose the type of import to perform:'); ?></p>
				<select name="importer">
					<?php
					foreach($import_names as $name) {
						echo "<option>{$name}</option>";
					}
					?>
				</select>
				<p class="submit"><input type="submit" name="import" value="<?php _e('Select'); ?>"></p>
			<?php
				endif;
			else:
				echo Plugins::filter('import_stage', '', @$_POST['importer'], @$_POST['stage'], @$_POST['step']);
			?>
			<?php
			endif;
			if(isset($_POST['importer'])) {
				echo '<input type="hidden" name="importer" value="' . $_POST['importer'] . '">';
			}
			?>
		</form>

	</div>
</div>
<?php
// unset the $db_connection variable, since we don't need it any more
unset( $db_connection );
?>
<?php include('footer.php'); ?>

{'fraction_non_alphanumeric': 0.23880597014925373, 'fraction_numerical': 0.0031982942430703624, 'mean_word_length': 3.982300884955752, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, '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': '3372357', 'n_tokens_mistral': 1121, 'n_tokens_neox': 959, 'n_words': 234}