From 1eba03cc291bd0cd654f89691472c3acd0003087 Mon Sep 17 00:00:00 2001 From: ruan Date: Wed, 6 Jul 2016 17:35:40 +0200 Subject: [PATCH] Fix column selection issue --- inc/page.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/page.php b/inc/page.php index 9604145..90ffb91 100644 --- a/inc/page.php +++ b/inc/page.php @@ -137,10 +137,13 @@ class Page { // Under certain versions of PHP, there is a bug with BIT columns. // An empty string is returned no matter what the value is. // Workaround: cast to unsigned. - $selection = "id,uuid,reason,banned_by_name,banned_by_uuid,removed_by_name,time,until,CAST(active AS UNSIGNED) AS active"; + $selection = "id,uuid,reason,banned_by_name,banned_by_uuid,time,until,CAST(active AS UNSIGNED) AS active"; if ($table === $this->settings->table['warnings']) { $selection .= ",CAST(warned AS UNSIGNED) AS warned"; } + if ($table !== $this->settings->table['kicks']) { + $selection .= "removed_by_name"; + } return $selection; }