post.php, mod.php: pass the context to check_login

This commit is contained in:
Zankaria 2024-10-01 22:15:03 +02:00
parent 4197b5a376
commit 8cf497eb93
3 changed files with 23 additions and 18 deletions

View file

@ -850,7 +850,7 @@ function mod_view_thread50(Context $ctx, $boardName, $thread) {
}
function mod_ip_remove_note(Context $ctx, $ip, $id) {
global $config, $mod;
global $config;
if (!hasPermission($config['mod']['remove_notes']))
error($config['error']['noaccess']);
@ -1057,7 +1057,7 @@ function mod_ip(Context $ctx, $ip, string $encoded_cursor = '') {
mod_page(sprintf('%s: %s', _('IP'), htmlspecialchars($ip)), 'mod/view_ip.html', $args, $args['hostname']);
}
function mod_ban() {
function mod_ban(Context $ctx) {
global $config;
if (!hasPermission($config['mod']['ban']))
@ -1433,7 +1433,7 @@ function mod_move_reply(Context $ctx, $originBoard, $postID) {
}
function mod_move(Context $ctx, $originBoard, $postID) {
global $board, $config, $pdo;
global $board, $config, $pdo;
if (!openBoard($originBoard))
error($config['error']['noboard']);
@ -1645,8 +1645,8 @@ function mod_move(Context $ctx, $originBoard, $postID) {
mod_page(_('Move thread'), 'mod/move.html', array('post' => $postID, 'board' => $originBoard, 'boards' => $boards, 'token' => $security_token));
}
function mod_merge($originBoard, $postID) {
global $board, $config, $mod, $pdo;
function mod_merge(Context $ctx, $originBoard, $postID) {
global $board, $config, $pdo;
if (!openBoard($originBoard))
error($config['error']['noboard']);