From 8f607940fea9583482eea0c840970298f0fc80a7 Mon Sep 17 00:00:00 2001 From: ruan <2369127-ruany@users.noreply.gitlab.com> Date: Sat, 27 May 2023 15:43:01 +0200 Subject: [PATCH] Fix show_inactive_bans=false --- inc/database.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/database.php b/inc/database.php index 077baf3..30c4761 100644 --- a/inc/database.php +++ b/inc/database.php @@ -30,7 +30,10 @@ class Database { } if (!$cfg->show_inactive_bans) { + $time = gettimeofday(); + $millis = $time["sec"] * 1000; $this->active_query = self::append_query($this->active_query, "active=" . Database::$TRUE); + $this->active_query = self::append_query($this->active_query, "(until<1 OR until>$millis)"); } if (!$cfg->show_silent_bans) {