From f0bf32c5c1d7bcacab86e0623b0600c2a694303c Mon Sep 17 00:00:00 2001 From: natec Date: Tue, 11 Dec 2001 08:43:05 +0000 Subject: bug #488067: no, preg_quote() didn't always have 2 args. git-svn-id: file:///svn/phpbb/trunk@1553 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/develop/search_fill.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'phpBB/develop') diff --git a/phpBB/develop/search_fill.php b/phpBB/develop/search_fill.php index 2c34a3a314..4a38fcde19 100644 --- a/phpBB/develop/search_fill.php +++ b/phpBB/develop/search_fill.php @@ -146,6 +146,7 @@ include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); +include($phpbb_root_path . 'includes/functions.'.$phpEx); print "\n\n"; @@ -162,14 +163,14 @@ $synonym_array = file($phpbb_root_path . "language/lang_english/search_synonyms. for ($j = 0; $j < count($stopword_array); $j++) { $filter_word = trim(strtolower($stopword_array[$j])); - $search[] = "/\b" . preg_quote($filter_word, "/") . "\b/is"; + $search[] = "/\b" . phpbb_preg_quote($filter_word, "/") . "\b/is"; $replace[] = ''; } for ($j = 0; $j < count($synonym_list); $j++) { list($replace_synonym, $match_synonym) = split(" ", trim(strtolower($synonym_list[$j]))); - $search[] = "/\b" . preg_quote(trim($match_synonym), "/") . "\b/is"; + $search[] = "/\b" . phpbb_preg_quote(trim($match_synonym), "/") . "\b/is"; $replace[] = " " . trim($replace_synonym) . " "; } @@ -313,7 +314,7 @@ for(;$postcounter <= $max_post_id; $postcounter += $batchsize) } /* - //$phrase_string = preg_replace("/\b" . preg_quote($word[$j], "/") . "\b/is", $word_id, $phrase_string); + //$phrase_string = preg_replace("/\b" . phpbb_preg_quote($word[$j], "/") . "\b/is", $word_id, $phrase_string); $phrase_string = trim(preg_replace("/ {2,}/s", " ", str_replace(array("*", "'"), " ", $phrase_string))); $sql = "INSERT INTO phpbb_search_phrasematch (post_id, phrase_list) -- cgit v1.2.1