From 226626ae389855e7dd1cb71fdc3c0c0ef7e3132f Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 30 May 2010 14:41:12 +0200 Subject: [PATCH] Also replace $UID and $PID in WHERE and ORDER BY statements. Signed-off-by: Florent Bruneau --- classes/userfilter.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/classes/userfilter.php b/classes/userfilter.php index 2931a05..cd4058f 100644 --- a/classes/userfilter.php +++ b/classes/userfilter.php @@ -1630,6 +1630,9 @@ class UserFilter extends PlFilter // available only once all UFC have set their conditions (UFO_Score) if (is_null($this->query)) { $where = $this->root->buildCondition($this); + $where = str_replace(array_keys($this->joinMetas), + $this->joinMetas, + $where); } if (is_null($this->orderby)) { $orders = array(); @@ -1641,6 +1644,9 @@ class UserFilter extends PlFilter } else { $this->orderby = 'ORDER BY ' . implode(', ', $orders); } + $this->orderby = str_replace(array_keys($this->joinMetas), + $this->joinMetas, + $this->orderby); } if (is_null($this->query)) { if ($this->with_accounts) { -- 2.1.4