Name token search must be a prefix search, not full text.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 5 Mar 2010 22:13:32 +0000 (23:13 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 5 Mar 2010 22:13:32 +0000 (23:13 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/userfilter.php

index 162099b..801da2c 100644 (file)
@@ -374,7 +374,7 @@ class UFC_NameTokens implements UserFilterCondition
         } else {
             $tokconds = array();
             foreach ($this->tokens as $token) {
-                $tokconds[] = $sub . '.token ' . XDB::formatWildcards(XDB::WILDCARD_CONTAINS, $token);
+                $tokconds[] = $sub . '.token ' . XDB::formatWildcards(XDB::WILDCARD_PREFIX, $token);
             }
             $conds[] = implode(' OR ', $tokconds);
         }
@@ -1326,6 +1326,7 @@ class UFC_MarketingHash implements UserFilterCondition
         return XDB::format('rm.hash = {?}', $this->hash);
     }
 }
+// }}}
 
 /******************
  * ORDERS