<commit_before><?php

/**
 * @name      <NAME>
 * @copyright Elkarte Forum contributors
 * @license   BSD http://opensource.org/licenses/BSD-3-Clause
 *
 * This software is a derived product, based on:
 *
 * Simple Machines Forum (SMF)
 * copyright:	2011 Simple Machines (http://www.simplemachines.org)
 * license:  	BSD, See included LICENSE.TXT for terms and conditions.
 *
 * @version 1.0 Alpha
 *
 * This file's job is to handle things related to post moderation.
 *
 */

if (!defined('ELKARTE'))
	die('Hacking attempt...');

/**
 * This is a handling function for all things post moderation.
 */
function action_postmoderation()
{
	global $sourcedir;

	 // @todo We'll shift these later bud.
	loadLanguage('ModerationCenter');
	loadTemplate('ModerationCenter');

	// Probably need this...
	require_once($sourcedir . '/controllers/ModerationCenter.controller.php');

	// Allowed sub-actions, you know the drill by now!
	$subactions = array(
		'approve' => 'action_approve',
		'attachments' => 'action_unapproved_attachments',
		'replies' => 'action_unapproved',
		'topics' => 'action_unapproved',
	);

	// Pick something valid...
	if (!isset($_REQUEST['sa']) || !isset($subactions[$_REQUEST['sa']]))
		$_REQUEST['sa'] = 'replies';

	$subactions[$_REQUEST['sa']]();
}

/**
 * View all unapproved posts.
 */
function action_unapproved()
{
	global $txt, $scripturl, $context, $user_info, $smcFunc;

	$context['current_view'] = isset($_GET['sa']) && $_GET['sa'] == 'topics' ? 'topics' : 'replies';
	$context['page_title'] = $txt['mc_unapproved_posts'];
<commit_msg>Removed extra controller include. (hopefully :)<commit_after><?php

/**
 * @name      Elkarte Forum
 * @copyright Elkarte Forum contributors
 * @license   BSD http://opensource.org/licenses/BSD-3-Clause
 *
 * This software is a derived product, based on:
 *
 * Simple Machines Forum (SMF)
 * copyright:	2011 Simple Machines (http://www.simplemachines.org)
 * license:  	BSD, See included LICENSE.TXT for terms and conditions.
 *
 * @version 1.0 Alpha
 *
 * This file's job is to handle things related to post moderation.
 *
 */

if (!defined('ELKARTE'))
	die('Hacking attempt...');

/**
 * This is a handling function for all things post moderation.
 */
function action_postmoderation()
{
	global $sourcedir;

	 // @todo We'll shift these later bud.
	loadLanguage('ModerationCenter');
	loadTemplate('ModerationCenter');

	// Allowed sub-actions, you know the drill by now!
	$subactions = array(
		'approve' => 'action_approve',
		'attachments' => 'action_unapproved_attachments',
		'replies' => 'action_unapproved',
		'topics' => 'action_unapproved',
	);

	// Pick something valid...
	if (!isset($_REQUEST['sa']) || !isset($subactions[$_REQUEST['sa']]))
		$_REQUEST['sa'] = 'replies';

	$subactions[$_REQUEST['sa']]();
}

/**
 * View all unapproved posts.
 */
function action_unapproved()
{
	global $txt, $scripturl, $context, $user_info, $smcFunc;

	$context['current_view'] = isset($_GET['sa']) && $_GET['sa'] == 'topics' ? 'topics' : 'replies';
	$context['page_title'] = $txt['mc_unapproved_posts'];

{'fraction_non_alphanumeric': 0.1681877444589309, 'fraction_numerical': 0.0045632333767926985, 'mean_word_length': 4.51978417266187, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 12, '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': '4548315', 'n_tokens_mistral': 1056, 'n_tokens_neox': 995, 'n_words': 257}