From 7e4dd5567b9a0974de4a49d3f30ca615dec64287 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Wed, 22 May 2024 22:14:38 +0200 Subject: [PATCH] bans.php: always print modLog --- inc/bans.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/inc/bans.php b/inc/bans.php index 3f0d0794..c6847a4a 100644 --- a/inc/bans.php +++ b/inc/bans.php @@ -370,15 +370,14 @@ class Bans { $query->bindValue(':post', null, PDO::PARAM_NULL); $query->execute() or error(db_error($query)); - if (isset($mod['id']) && $mod['id'] == $mod_id) { - $ban_len = $length > 0 ? preg_replace('/^(\d+) (\w+?)s?$/', '$1-$2', Format\until($length)) : 'permanent'; - $ban_board = $ban_board ? "/$ban_board/" : 'all boards'; - $ban_ip = filter_var($mask, FILTER_VALIDATE_IP) !== false ? "$cloaked_mask" : $cloaked_mask; - $ban_id = $pdo->lastInsertId(); - $ban_reason = $reason ? 'reason: ' . utf8tohtml($reason) : 'no reason'; - modLog("Created a new $ban_len ban on $ban_board for $ban_ip (# $ban_id ) with $ban_reason"); - } + $ban_len = $length > 0 ? preg_replace('/^(\d+) (\w+?)s?$/', '$1-$2', Format\until($length)) : 'permanent'; + $ban_board = $ban_board ? "/$ban_board/" : 'all boards'; + $ban_ip = filter_var($mask, FILTER_VALIDATE_IP) !== false ? "$cloaked_mask" : $cloaked_mask; + $ban_id = $pdo->lastInsertId(); + $ban_reason = $reason ? 'reason: ' . utf8tohtml($reason) : 'no reason'; + + modLog("Created a new $ban_len ban on $ban_board for $ban_ip (# $ban_id ) with $ban_reason"); rebuildThemes('bans');