1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01: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:
Paul S. Owen 2001-11-09 12:32:23 +00:00
parent 32e989d7bd
commit cb427774a6

View File

@ -500,11 +500,14 @@ if( isset($HTTP_GET_VARS['highlight']) )
for($i = 0; $i < count($words); $i++)
{
$highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
$highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
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