|
From: Nathan C. <na...@us...> - 2001-12-11 08:43:08
|
Update of /cvsroot/phpbb/phpBB2/develop
In directory usw-pr-cvs1:/tmp/cvs-serv4052/develop
Modified Files:
search_fill.php
Log Message:
bug #488067: no, preg_quote() didn't always have 2 args.
Index: search_fill.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/develop/search_fill.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** search_fill.php 2001/11/29 15:27:48 1.3
--- search_fill.php 2001/12/11 08:43:04 1.4
***************
*** 147,150 ****
--- 147,151 ----
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";
***************
*** 163,167 ****
{
$filter_word = trim(strtolower($stopword_array[$j]));
! $search[] = "/\b" . preg_quote($filter_word, "/") . "\b/is";
$replace[] = '';
}
--- 164,168 ----
{
$filter_word = trim(strtolower($stopword_array[$j]));
! $search[] = "/\b" . phpbb_preg_quote($filter_word, "/") . "\b/is";
$replace[] = '';
}
***************
*** 170,174 ****
{
list($replace_synonym, $match_synonym) = split(" ", trim(strtolower($synonym_list[$j])));
! $search[] = "/\b" . preg_quote(trim($match_synonym), "/") . "\b/is";
$replace[] = " " . trim($replace_synonym) . " ";
}
--- 171,175 ----
{
list($replace_synonym, $match_synonym) = split(" ", trim(strtolower($synonym_list[$j])));
! $search[] = "/\b" . phpbb_preg_quote(trim($match_synonym), "/") . "\b/is";
$replace[] = " " . trim($replace_synonym) . " ";
}
***************
*** 314,318 ****
/*
! //$phrase_string = preg_replace("/\b" . preg_quote($word[$j], "/") . "\b/is", $word_id, $phrase_string);
$phrase_string = trim(preg_replace("/ {2,}/s", " ", str_replace(array("*", "'"), " ", $phrase_string)));
--- 315,319 ----
/*
! //$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)));
|