From cd998e5c82a63dee9fbe723cbc07cdafab5b4fb3 Mon Sep 17 00:00:00 2001 From: ruan Date: Sat, 3 Sep 2016 07:10:03 +0200 Subject: [PATCH] Fix pure IP bans being shown on pager --- inc/page.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/page.php b/inc/page.php index 4fd5839..cc3a170 100644 --- a/inc/page.php +++ b/inc/page.php @@ -209,6 +209,7 @@ class Page { * @return null|string */ function get_name($uuid) { + if ($uuid === null || $uuid === "" || strrpos($uuid, "#", -strlen($uuid)) !== false) return null; if (in_array($uuid, $this->settings->console_aliases)) { return $this->settings->console_name; } @@ -383,7 +384,7 @@ class Page { $page = $this->name . ".php"; if ($total === -1) { - $result = $this->conn->query("SELECT COUNT(*) AS count FROM $table")->fetch(PDO::FETCH_ASSOC); + $result = $this->conn->query("SELECT COUNT(*) AS count FROM $table WHERE uuid <> '#offline#' AND uuid IS NOT NULL")->fetch(PDO::FETCH_ASSOC); $total = $result['count']; }