|
From: Nathan C. <na...@us...> - 2001-12-11 08:43:08
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv4052
Modified Files:
posting.php search.php viewtopic.php
Log Message:
bug #488067: no, preg_quote() didn't always have 2 args.
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -r1.121 -r1.122
*** posting.php 2001/12/05 00:00:39 1.121
--- posting.php 2001/12/11 08:43:04 1.122
***************
*** 71,75 ****
{
$filter_word = trim(strtolower($stopword_list[$j]));
! $entry = preg_replace("/\b" . preg_quote($filter_word, "/") . "\b/is", " ", $entry);
}
}
--- 71,75 ----
{
$filter_word = trim(strtolower($stopword_list[$j]));
! $entry = preg_replace("/\b" . phpbb_preg_quote($filter_word, "/") . "\b/is", " ", $entry);
}
}
***************
*** 80,84 ****
{
list($replace_synonym, $match_synonym) = split(" ", trim(strtolower($synonym_list[$j])));
! $entry = preg_replace("/\b" . preg_quote(trim($match_synonym), "/") . "\b/is", " " . trim($replace_synonym) . " ", $entry);
}
}
--- 80,84 ----
{
list($replace_synonym, $match_synonym) = split(" ", trim(strtolower($synonym_list[$j])));
! $entry = preg_replace("/\b" . phpbb_preg_quote(trim($match_synonym), "/") . "\b/is", " " . trim($replace_synonym) . " ", $entry);
}
}
Index: search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/search.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** search.php 2001/12/10 00:17:20 1.42
--- search.php 2001/12/11 08:43:04 1.43
***************
*** 65,69 ****
if( $filter_word != "and" && $filter_word != "or" && $filter_word != "not" )
{
! $entry = preg_replace("/\b" . preg_quote($filter_word, "/") . "\b/is", " ", $entry);
}
}
--- 65,69 ----
if( $filter_word != "and" && $filter_word != "or" && $filter_word != "not" )
{
! $entry = preg_replace("/\b" . phpbb_preg_quote($filter_word, "/") . "\b/is", " ", $entry);
}
}
***************
*** 84,88 ****
$replace_synonym != "and" && $replace_synonym != "or" && $replace_synonym != "not" )
{
! $entry = preg_replace("/\b" . preg_quote(trim($match_synonym), "/") . "\b/is", " " . trim($replace_synonym) . " ", $entry);
}
}
--- 84,88 ----
$replace_synonym != "and" && $replace_synonym != "or" && $replace_synonym != "not" )
{
! $entry = preg_replace("/\b" . phpbb_preg_quote(trim($match_synonym), "/") . "\b/is", " " . trim($replace_synonym) . " ", $entry);
}
}
***************
*** 849,853 ****
$highlight_active .= " " . $split_word;
! $search_string[] = "#\b(" . str_replace("\*", ".*?", preg_quote($split_word, "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
$replace_string[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
--- 849,853 ----
$highlight_active .= " " . $split_word;
! $search_string[] = "#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($split_word, "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
$replace_string[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
***************
*** 858,862 ****
if( $replace_synonym == $split_word )
{
! $search_string[] = "#\b(" . str_replace("\*", ".*?", preg_quote($replace_synonym, "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
$replace_string[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
--- 858,862 ----
if( $replace_synonym == $split_word )
{
! $search_string[] = "#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($replace_synonym, "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
$replace_string[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.145
retrieving revision 1.146
diff -C2 -r1.145 -r1.146
*** viewtopic.php 2001/12/05 00:20:52 1.145
--- viewtopic.php 2001/12/11 08:43:04 1.146
***************
*** 549,553 ****
if( trim($words[$i]) != "" )
{
! $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
$highlight_replace[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
}
--- 549,553 ----
if( trim($words[$i]) != "" )
{
! $highlight_match[] = "#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($words[$i], "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
$highlight_replace[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
}
|