Fix soundex in quick search.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 6 Mar 2010 11:31:54 +0000 (12:31 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 6 Mar 2010 11:31:54 +0000 (12:31 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/userfilter.php
include/ufbuilder.inc.php

index 801da2c..aed33ae 100644 (file)
@@ -2015,7 +2015,7 @@ class UserFilter extends PlFilter
         /* We don't return joins, since with_sn forces the SELECT to run on search_name first */
         if ($this->with_sn && !$this->with_forced_sn) {
             return array(
-                'sn' => PlSqlJoin::left('search_name', '$ME.uid = $PID')
+                'sn' => PlSqlJoin::left('search_name', '$ME.pid = $PID')
             );
         } else {
             return array();
index ee8f3fd..35134bb 100644 (file)
@@ -112,7 +112,7 @@ class UserFilterBuilder
     }
 
     public function i($key, $def = 0) {
-        return intval(trim(Env::i($this->envprefix . $key, $def)));
+        return Env::i($this->envprefix . $key, $def);
     }
 
     public function v($key, $def = null) {
@@ -490,7 +490,7 @@ class UFBF_Quick extends UFB_Field
             } else {
                 $flags = array('public');
             }
-            if ($ufb->i('soundex')) {
+            if ($ufb->i('with_soundex')) {
                 $soundex = true;
                 $st = array();
                 foreach ($strings as $string) {
@@ -1051,4 +1051,6 @@ class UFBF_MentorExpertise extends UFBF_Text
     }
 }
 // }}}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>