<commit_before><?php
/*
 * Wrapper script redirecting user operations to correct destination
 */
require_once("../config.php");

if (empty($_POST) || empty($_POST['formaction']) || empty($_POST['id'])) {
    die();
}

// Add every page will be redirected by this script
$actions = array(
        'messageselect.php',
        'extendenrol.php'
    );

if (array_search($_POST['formaction'], $actions) === false) {
    die();
}

if (!confirm_sesskey()) {
    die();
}

require_once($_POST['formaction']);
?><commit_msg>Bug #5163 - user/action_redir.php should print properly formatted error messages<commit_after><?php
/**
* Wrapper script redirecting user operations to correct destination.
*/

require_once("../config.php");

$formaction = required_param('formaction', PARAM_FILE);
$id = required_param('id', PARAM_INT);

// Add every page will be redirected by this script
$actions = array(
        'messageselect.php',
        'extendenrol.php'
        );

if (array_search($formaction, $actions) === false) {
    print_error('unknownuseraction');
}

if (!confirm_sesskey()) {
    print_error('confirmsesskeybad');
}

require_once($formaction);
?>
{'fraction_non_alphanumeric': 0.16536118363794605, 'fraction_numerical': 0.0034812880765883376, 'mean_word_length': 4.373831775700935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '198333', 'n_tokens_mistral': 359, 'n_tokens_neox': 355, 'n_words': 83}