<commit_before><?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: Articles/admin/article_settings.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
pageAccess("S8");
if (isset($_POST['savesettings'])) {
    $error = 0;
    $inputArray = array(
        "article_pagination" => form_sanitizer($_POST['article_pagination'], 0, "article_pagination"),
        "article_allow_submission" => form_sanitizer($_POST['article_allow_submission'], 0, "article_allow_submission"),
        "article_extended_required" => isset($_POST['article_extended_required']) ? 1 : 0,
    );

    if (defender::safe()) {
        foreach ($inputArray as $settings_name => $settings_value) {
            $inputSettings = array(
                "settings_name" => $settings_name, "settings_value" => $settings_value, "settings_inf" => "article",
            );
            dbquery_insert(DB_SETTINGS_INF, $inputSettings, "update", array("primary_key" => "settings_name"));
        }
        addNotice("success", $locale['900']);
        redirect(FUSION_REQUEST);
    } else {
        addNotice('danger', $locale['901']);
    }
}

echo "<div class='well m-t-20'>".$locale['articles_0031']."</div>";
echo openform('settingsform', 'post', FUSION_REQUEST);
openside('');
echo form_text("article_pagination", $locale['articles_0032'], $article_settings['article_pagination'], array(
    "inline" => TRUE, "max_length" => 4, "width" => "150px", "type" => "number"
));
echo form_select("article_allow_submission", $locale['articles_0033'], $article_settings['article_allow_submission'], array(
    "inline" => TRUE, "options" => array($locale['disable'], $locale['enable'])
));
echo form_checkbox("article_extended_required", $locale['articles_0034'], $article_settings['article_extended_required'], array("inline" => TRUE));
closeside();
echo form_button('savesettings', $locale['750'], $locale['750'], array('class' => 'btn-primary'));
echo closeform();<commit_msg>Update article_settings.php<commit_after><?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) PHP-Fusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: Articles/admin/article_settings.php
| Author: PHP-Fusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
pageAccess("S8");
if (isset($_POST['savesettings'])) {
    $error = 0;
    $inputArray = array(
        "article_pagination" => form_sanitizer($_POST['article_pagination'], 0, "article_pagination"),
        "article_allow_submission" => form_sanitizer($_POST['article_allow_submission'], 0, "article_allow_submission"),
        "article_extended_required" => isset($_POST['article_extended_required']) ? 1 : 0,
    );

    if (defender::safe()) {
        foreach ($inputArray as $settings_name => $settings_value) {
            $inputSettings = array(
                "settings_name" => $settings_name, "settings_value" => $settings_value, "settings_inf" => "article",
            );
            dbquery_insert(DB_SETTINGS_INF, $inputSettings, "update", array("primary_key" => "settings_name"));
        }
        addNotice("success", $locale['900']);
        redirect(FUSION_REQUEST);
    } else {
        addNotice('danger', $locale['901']);
    }
}

echo "<div class='well m-t-20'>".$locale['articles_0031']."</div>";
echo openform('settingsform', 'post', FUSION_REQUEST);
openside('');
echo form_text('article_pagination', $locale['articles_0032'], $article_settings['article_pagination'], array(
    'inline' => TRUE, 'max_length' => 4, 'width' => '150px', 'type' => 'number'
));
echo form_select('article_allow_submission', $locale['articles_0033'], $article_settings['article_allow_submission'], array(
    'inline' => TRUE, 'options' => array($locale['disable'], $locale['enable'])
));
echo form_checkbox('article_extended_required', $locale['articles_0034'], $article_settings['article_extended_required'], array('inline' => TRUE));
closeside();
echo form_button('savesettings', $locale['750'], $locale['750'], array('class' => 'btn-primary'));
echo closeform();
{'fraction_non_alphanumeric': 0.23559907834101382, 'fraction_numerical': 0.015360983102918587, 'mean_word_length': 3.2384052074857608, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 39, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4730614', 'n_tokens_mistral': 1498, 'n_tokens_neox': 1405, 'n_words': 322}