Minor improvements (#1410)

* Minor improvements

* Update modcp.php

* Update CHANGELOG.md

* Update modcp.php
This commit is contained in:
Roman Kelesidis 2024-02-22 18:17:43 +07:00 committed by GitHub
commit 22511c3edc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 8 deletions

View file

@ -69,6 +69,9 @@ function validate_mode_condition($request_index, $mod_action = '')
return (isset($_REQUEST[$request_index]) || (isset($_POST['mod_action']) && $_POST['mod_action'] === $mod_action));
}
// Start session management
$user->session_start(['req_login' => true]);
// Obtain initial vars
$forum_id = $_REQUEST['f'] ?? 0;
$topic_id = $_REQUEST['t'] ?? 0;
@ -129,9 +132,6 @@ if ($topic_id) {
bb_die('Invalid request');
}
// Start session management
$user->session_start(['req_login' => true]);
// Check if user did or did not confirm. If they did not, forward them to the last page they were on
if (isset($_POST['cancel']) || IS_GUEST) {
$redirect = 'index.php';