mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Corrected for space within highlighted words, this is the version running on the main site
git-svn-id: file:///svn/phpbb/trunk@1292 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
32e989d7bd
commit
cb427774a6
1 changed files with 6 additions and 3 deletions
|
@ -499,12 +499,15 @@ if( isset($HTTP_GET_VARS['highlight']) )
|
|||
$words = explode(" ", trim(urldecode($HTTP_GET_VARS['highlight'])));
|
||||
|
||||
for($i = 0; $i < count($words); $i++)
|
||||
{
|
||||
if( trim($words[$i] != "" )
|
||||
{
|
||||
$highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
|
||||
$highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
|
||||
}
|
||||
}
|
||||
|
||||
$highlight_active = ( count($words) ) ? true : false;
|
||||
$highlight_active = ( count($highlight_match) ) ? true : false;
|
||||
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue