Fix formatCustomOrder.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 16 Feb 2010 20:43:37 +0000 (21:43 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 16 Feb 2010 20:44:35 +0000 (21:44 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/xdb.php

index 1df0fff..4eb8ae1 100644 (file)
@@ -184,7 +184,7 @@ class XDB
     // Returns a FIELD(blah, 3, 1, 2) for use in an order with custom orders
     public static function formatCustomOrder($field, $values)
     {
-        return 'FIELD( ' . $field . ', ' . XDB::formatArray($values) . ')';
+        return 'FIELD( ' . $field . ', ' . implode(', ', array_map(array('XDB', 'escape'), $values)) . ')';
     }
 
     public static function execute()