From: Florent Bruneau Date: Sun, 30 May 2010 12:41:12 +0000 (+0200) Subject: Also replace $UID and $PID in WHERE and ORDER BY statements. X-Git-Tag: xorg/1.0.0~222 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=226626ae389855e7dd1cb71fdc3c0c0ef7e3132f;p=platal.git Also replace $UID and $PID in WHERE and ORDER BY statements. Signed-off-by: Florent Bruneau --- 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) {