[Fusionforge-commits] r17884 - trunk/src/plugins/wiki/www/lib/WikiDB/backend

Marc-Etienne VARGENAU vargenau at fusionforge.org
Tue Sep 3 11:58:38 CEST 2013


Author: vargenau
Date: 2013-09-03 11:58:38 +0200 (Tue, 03 Sep 2013)
New Revision: 17884

Modified:
   trunk/src/plugins/wiki/www/lib/WikiDB/backend/PearDB_ffpgsql.php
Log:
wiki: Use english catalog for search in the wiki as phpwiki is using english to split words

Modified: trunk/src/plugins/wiki/www/lib/WikiDB/backend/PearDB_ffpgsql.php
===================================================================
--- trunk/src/plugins/wiki/www/lib/WikiDB/backend/PearDB_ffpgsql.php	2013-09-03 09:57:09 UTC (rev 17883)
+++ trunk/src/plugins/wiki/www/lib/WikiDB/backend/PearDB_ffpgsql.php	2013-09-03 09:58:38 UTC (rev 17884)
@@ -620,9 +620,9 @@
             $search_string = str_replace('%', '', $search_string);
             $search_clause = "substring(plugin_wiki_page.pagename from 0 for $len) = '$pat') AND (";
 
-            $search_clause .= "idxFTI @@ to_tsquery('$search_string')";
+            $search_clause .= "idxFTI @@ to_tsquery('english', '$search_string')";
             if (!$orderby)
-                $orderby = " ORDER BY ts_rank(idxFTI, to_tsquery('$search_string')) DESC";
+                $orderby = " ORDER BY ts_rank(idxFTI, to_tsquery('english', '$search_string')) DESC";
         } else {
             $callback = new WikiMethodCb($searchobj, "_pagename_match_clause");
             $search_clause = "substring(plugin_wiki_page.pagename from 0 for $len) = '$pat') AND (";




More information about the Fusionforge-commits mailing list