diff options
author | natec <natec@users.sourceforge.net> | 2001-12-11 08:43:05 +0000 |
---|---|---|
committer | natec <natec@users.sourceforge.net> | 2001-12-11 08:43:05 +0000 |
commit | f0bf32c5c1d7bcacab86e0623b0600c2a694303c (patch) | |
tree | cdbc1ec6a224831de763f45df775439e8f5897cf /phpBB/develop/search_fill.php | |
parent | Updates? (diff) | |
download | phpbb-f0bf32c5c1d7bcacab86e0623b0600c2a694303c.tar.gz phpbb-f0bf32c5c1d7bcacab86e0623b0600c2a694303c.tar.bz2 phpbb-f0bf32c5c1d7bcacab86e0623b0600c2a694303c.zip |
bug #488067: no, preg_quote() didn't always have 2 args.
git-svn-id: file:///svn/phpbb/trunk@1553 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/develop/search_fill.php')
-rw-r--r-- | phpBB/develop/search_fill.php | 7 |
1 files changed, 4 insertions, 3 deletions
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 "<html>\n<body>\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) |