<commit_before><?php 
defined('_JEXEC') or die( 'Restricted access' );
$juser = JFactory::getUser();
?>
<div id="content-header" class="full">
	<h2><?php echo JText::_('COM_FORUM'); ?></h2>
</div>

<?php foreach ($this->notifications as $notification) { ?>
<p class="<?php echo $notification['type']; ?>"><?php echo $this->escape($notification['message']); ?></p>
<?php } ?>

<div class="main section">
	<div class="aside">
		<div class="container">
			<h3><?php echo JText::_('Statistics'); ?><span class="starter-point"></span></h3>
			<table summary="<?php echo JText::_('Statistics'); ?>">
				<tbody>
					<tr>
						<th><?php echo JText::_('Categories'); ?></th>
						<td><?php echo $this->stats->categories; ?></td>
					</tr>
					<tr>
						<th><?php echo JText::_('Discussions'); ?></th>
						<td><?php echo $this->stats->threads; ?></td>
					</tr>
					<tr>
						<th><?php echo JText::_('Posts'); ?></th>
						<td><?php echo $this->stats->posts; ?></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="container">
			<h3><?php echo JText::_('Last Post'); ?><span class="starter-point"></span></h3>
			<p>
<?php
			if (is_object($this->lastpost)) 
			{
				$lname = JText::_('Anonymous');
				$lastposter = JUser::getInstance($this->lastpost->created_by);
				if (is_object($lastposter)) 
				{
					$lname = '<a href="' . JRoute::_('index.php?option=com_members&id=' . $lastposter->get('id')) . '">' . $this->escape(stripslashes($lastposter->get('name'))) . '</a>';
				}
?>
				<span class="entry-date">
					@
					<span class="time"><?php echo JHTML::_('date', $this->lastpost->created, '%I:%M %p', 0); ?></span> <?php echo JText::_('COM_FORUM_ON'); ?> 
					<span class="date"><?php echo JHTML::_('date', $this->lastpost->created, '%d %b, %Y', 0); ?></span>
				</span>
				<span class="entry-author">
					<?php echo JText::_('by'); ?>
					<?php echo $lname; ?>
				</span>
<?php } else { ?>
				<?php echo JText::_('none'); ?>
<?php } ?>
			</p>
		</div>
		
<?php if ($this->config->get('access-create-section')) { ?>
		<div class="container">
			<h3><?php echo JText::_('Sections'); ?></h3>
			<p class="starter">
				<span class="starter-point"></span>
				<?php echo JText::_('Use sections to group related categories.'); ?>
			</p>
		</div>
		
		<form action="<?php echo JRoute::_('index.php?option=' . $this->option); ?>" method="post">
			<fieldset>
				<legend><?php echo JText::_('New Section'); ?></legend>
				<label for="field-title">
					<?php echo JText::_('Section Title'); ?>
					<input type="text" name="fields[title]" id="field-title" value="" />
				</label>
				<input type="submit" value="<?php echo JText::_('Create'); ?>" />
				<input type="hidden" name="task" value="savesection" />
				<input type="hidden" name="group_id" value="0" />
			</fieldset>
		</form>
<?php } ?>
	</div><!-- / .aside -->

	<div class="subject">
	<form action="<?php echo JRoute::_('index.php?option=' . $this->option); ?>" method="post">
		<div class="container data-entry">
			<input class="entry-search-submit" type="submit" value="<?php echo JText::_('Search'); ?>" />
			<fieldset class="entry-search">
				<legend><?php echo JText::_('Search categories'); ?></legend>				
				<label for="entry-search-field"><?php echo JText::_('Enter keyword or phrase'); ?></label>
				<input type="text" name="q" id="entry-search-field" value="<?php echo $this->escape($this->filters['search']); ?>" />
				<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
				<input type="hidden" name="controller" value="categories" />
				<input type="hidden" name="task" value="search" />
			</fieldset>
		</div><!-- / .container --><commit_msg>Fix section creation on site-wide forum<commit_after><?php 
defined('_JEXEC') or die( 'Restricted access' );
$juser = JFactory::getUser();
?>
<div id="content-header" class="full">
	<h2><?php echo JText::_('COM_FORUM'); ?></h2>
</div>

<?php foreach ($this->notifications as $notification) { ?>
<p class="<?php echo $notification['type']; ?>"><?php echo $this->escape($notification['message']); ?></p>
<?php } ?>

<div class="main section">
	<div class="aside">
		<div class="container">
			<h3><?php echo JText::_('Statistics'); ?><span class="starter-point"></span></h3>
			<table summary="<?php echo JText::_('Statistics'); ?>">
				<tbody>
					<tr>
						<th><?php echo JText::_('Categories'); ?></th>
						<td><?php echo $this->stats->categories; ?></td>
					</tr>
					<tr>
						<th><?php echo JText::_('Discussions'); ?></th>
						<td><?php echo $this->stats->threads; ?></td>
					</tr>
					<tr>
						<th><?php echo JText::_('Posts'); ?></th>
						<td><?php echo $this->stats->posts; ?></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="container">
			<h3><?php echo JText::_('Last Post'); ?><span class="starter-point"></span></h3>
			<p>
<?php
			if (is_object($this->lastpost)) 
			{
				$lname = JText::_('Anonymous');
				$lastposter = JUser::getInstance($this->lastpost->created_by);
				if (is_object($lastposter)) 
				{
					$lname = '<a href="' . JRoute::_('index.php?option=com_members&id=' . $lastposter->get('id')) . '">' . $this->escape(stripslashes($lastposter->get('name'))) . '</a>';
				}
?>
				<span class="entry-date">
					@
					<span class="time"><?php echo JHTML::_('date', $this->lastpost->created, '%I:%M %p', 0); ?></span> <?php echo JText::_('COM_FORUM_ON'); ?> 
					<span class="date"><?php echo JHTML::_('date', $this->lastpost->created, '%d %b, %Y', 0); ?></span>
				</span>
				<span class="entry-author">
					<?php echo JText::_('by'); ?>
					<?php echo $lname; ?>
				</span>
<?php } else { ?>
				<?php echo JText::_('none'); ?>
<?php } ?>
			</p>
		</div>
		
<?php if ($this->config->get('access-create-section')) { ?>
		<div class="container">
			<h3><?php echo JText::_('Sections'); ?></h3>
			<p class="starter">
				<span class="starter-point"></span>
				<?php echo JText::_('Use sections to group related categories.'); ?>
			</p>
		</div>

		<form action="<?php echo JRoute::_('index.php?option=' . $this->option); ?>" method="post">
			<fieldset>
				<legend><?php echo JText::_('New Section'); ?></legend>
				<label for="field-title">
					<?php echo JText::_('Section Title'); ?>
					<input type="text" name="fields[title]" id="field-title" value="" />
				</label>
				<input type="submit" value="<?php echo JText::_('Create'); ?>" />
				<input type="hidden" name="controller" value="sections" />
				<input type="hidden" name="task" value="save" />
				<input type="hidden" name="group_id" value="0" />
			</fieldset>
		</form>
<?php } ?>
	</div><!-- / .aside -->

	<div class="subject">
	<form action="<?php echo JRoute::_('index.php?option=' . $this->option); ?>" method="post">
		<div class="container data-entry">
			<input class="entry-search-submit" type="submit" value="<?php echo JText::_('Search'); ?>" />
			<fieldset class="entry-search">
				<legend><?php echo JText::_('Search categories'); ?></legend>
				<label for="entry-search-field"><?php echo JText::_('Enter keyword or phrase'); ?></label>
				<input type="text" name="q" id="entry-search-field" value="<?php echo $this->escape($this->filters['search']); ?>" />
				<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
				<input type="hidden" name="controller" value="categories" />
				<input type="hidden" name="task" value="search" />
			</fieldset>
		</div><!-- / .container -->
{'fraction_non_alphanumeric': 0.2595327604726101, 'fraction_numerical': 0.002953813104189044, 'mean_word_length': 4.002686366689053, 'pattern_counts': {'":': 0, '<': 264, '<?xml version=': 0, '>': 314, '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': '7654756', 'n_tokens_mistral': 2953, 'n_tokens_neox': 2615, 'n_words': 545}