Also replace $UID and $PID in WHERE and ORDER BY statements.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 30 May 2010 12:41:12 +0000 (14:41 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 30 May 2010 12:51:29 +0000 (14:51 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/userfilter.php

index 2931a05..cd4058f 100644 (file)
@@ -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) {