From: <var...@us...> - 2012-03-15 14:36:37
|
Revision: 8249 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8249&view=rev Author: vargenau Date: 2012-03-15 14:36:26 +0000 (Thu, 15 Mar 2012) Log Message: ----------- Fix "ab " search problem (quotes and space) Modified Paths: -------------- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php Modified: trunk/lib/WikiDB/backend/PearDB_ffpgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2012-03-15 13:08:39 UTC (rev 8248) +++ trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2012-03-15 14:36:26 UTC (rev 8249) @@ -607,7 +607,7 @@ // TODO: title still ignored, need better rank and subselect $callback = new WikiMethodCb($searchobj, "_fulltext_match_clause"); $search_string = $search->makeTsearch2SqlClauseObj($callback); - $search_string = str_replace(array("%"," "), array("","&"), $search_string); + $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')"; @@ -691,7 +691,7 @@ */ function _fulltext_match_clause($node) { $word = strtolower($node->word); - $word = str_replace(" ", "&", $word); // phrase fix + // $word = str_replace(" ", "&", $word); // phrase fix // @alu: use _quote maybe instead of direct pg_escape_string $word = pg_escape_string($word); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |