<commit_before><?php
/*
 *	Made by Samerton
 *  https://github.com/NamelessMC/Nameless/
 *  NamelessMC version 2.0.0-pr8
 *
 *  License: MIT
 *
 *  Maintenance Mode page
 */

$pages = new Pages();

define('PAGE', 'maintenance');
$page_title = $language->get('errors', 'maintenance_title');
require_once(ROOT_PATH . '/core/templates/frontend_init.php');

if (!$user->isLoggedIn()) {
    $smarty->assign(
        array(
            'LOGIN' => $language->get('general', 'sign_in'),
            'LOGIN_LINK' => URL::build('/login')
        )
    );
}

// Assign Smarty variables
$smarty->assign(
    array(
        'MAINTENANCE_TITLE' => $language->get('errors', 'maintenance_title'),
        'RETRY' => $language->get('errors', 'maintenance_retry')
    )
);

// Retrieve maintenance message
$maintenance_message = $maintenance['message'];
if (!empty($maintenance_message)) {
    $smarty->assign('MAINTENANCE_MESSAGE', Output::getPurified(htmlspecialchars_decode($maintenance_message)));
} else {
    $smarty->assign('MAINTENANCE_MESSAGE', 'Maintenance mode is enabled.');
}

// Load modules + template
Module::loadPage($user, $pages, $cache, $smarty, array($navigation, $cc_nav, $staffcp_nav), $widgets);

$page_load = microtime(true) - $start;
define('PAGE_LOAD_TIME', str_replace('{x}', round($page_load, 3), $language->get('general', 'page_loaded_in')));

$template->onPageLoad();

// Display template
$template->displayTemplate('maintenance.tpl', $smarty);<commit_msg>missed a page<commit_after><?php
/*
 *	Made by Samerton
 *  https://github.com/NamelessMC/Nameless/
 *  NamelessMC version 2.0.0-pr8
 *
 *  License: MIT
 *
 *  Maintenance Mode page
 */

$pages = new Pages();

define('PAGE', 'maintenance');
$page_title = $language->get('errors', 'maintenance_title');
require_once(ROOT_PATH . '/core/templates/frontend_init.php');

if (!$user->isLoggedIn()) {
    $smarty->assign(
        array(
            'LOGIN' => $language->get('general', 'sign_in'),
            'LOGIN_LINK' => URL::build('/login')
        )
    );
}

// Assign Smarty variables
$smarty->assign(
    array(
        'MAINTENANCE_TITLE' => $language->get('errors', 'maintenance_title'),
        'RETRY' => $language->get('errors', 'maintenance_retry')
    )
);

// Retrieve maintenance message
$maintenance_message = $maintenance['message'];
if (!empty($maintenance_message)) {
    $smarty->assign('MAINTENANCE_MESSAGE', Output::getPurified(htmlspecialchars_decode($maintenance_message)));
} else {
    $smarty->assign('MAINTENANCE_MESSAGE', 'Maintenance mode is enabled.');
}

// Load modules + template
Module::loadPage($user, $pages, $cache, $smarty, array($navigation, $cc_nav, $staffcp_nav), $widgets, $templates);

$page_load = microtime(true) - $start;
define('PAGE_LOAD_TIME', str_replace('{x}', round($page_load, 3), $language->get('general', 'page_loaded_in')));

$template->onPageLoad();

// Display template
$template->displayTemplate('maintenance.tpl', $smarty);
{'fraction_non_alphanumeric': 0.1857627118644068, 'fraction_numerical': 0.003389830508474576, 'mean_word_length': 4.696911196911197, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 2, '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': '2172886', 'n_tokens_mistral': 987, 'n_tokens_neox': 990, 'n_words': 168}