Fix: always shows all positions (regression)
This commit is contained in:
parent
9fbf64563a
commit
6723a830c4
@ -91,10 +91,10 @@ class uPosition {
|
|||||||
public function getAll($userId = NULL, $trackId = NULL) {
|
public function getAll($userId = NULL, $trackId = NULL) {
|
||||||
$rules = [];
|
$rules = [];
|
||||||
if (!empty($userId)) {
|
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)) {
|
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)) {
|
if (!empty($rules)) {
|
||||||
$where = "WHERE " . implode(" AND ", $rules);
|
$where = "WHERE " . implode(" AND ", $rules);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user