diff --git a/inc/bans.php b/inc/bans.php index 7e3a1408..d8681885 100644 --- a/inc/bans.php +++ b/inc/bans.php @@ -132,7 +132,7 @@ class Bans { WHERE (' . ($board !== false ? '(`board` IS NULL OR `board` = :board) AND' : '') . ' (`ipstart` = :ip OR (:ip >= `ipstart` AND :ip <= `ipend`))) - AND `expires` IS NULL OR `expires` >= :curr_time + AND (`expires` IS NULL OR `expires` >= :curr_time) ORDER BY `expires` IS NULL, `expires` DESC'); if ($board !== false) {