From 6723a830c4f8bb9483d65f3cf4b2adb943a6f2d2 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Fri, 7 Apr 2017 19:02:05 +0200 Subject: [PATCH] Fix: always shows all positions (regression) --- helpers/position.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/position.php b/helpers/position.php index 1a03a41..02cd9f7 100644 --- a/helpers/position.php +++ b/helpers/position.php @@ -91,10 +91,10 @@ class uPosition { public function getAll($userId = NULL, $trackId = NULL) { $rules = []; if (!empty($userId)) { - $rule[] = "p.user_id='" . self::$db->real_escape_string($userId) ."'"; + $rules[] = "p.user_id='" . self::$db->real_escape_string($userId) ."'"; } if (!empty($trackId)) { - $rule[] = "p.track_id='" . self::$db->real_escape_string($trackId) ."'"; + $rules[] = "p.track_id='" . self::$db->real_escape_string($trackId) ."'"; } if (!empty($rules)) { $where = "WHERE " . implode(" AND ", $rules);