aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-11-09 12:32:23 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-11-09 12:32:23 +0000
commitcb427774a6bcb3169bc0e4cc75b34fcfed245d1e (patch)
tree681d1e31d986a8278b21d53fdb69f5eb1da86d58
parent32e989d7bdef284035e264c3143caeb113f2403a (diff)
downloadforums-cb427774a6bcb3169bc0e4cc75b34fcfed245d1e.tar
forums-cb427774a6bcb3169bc0e4cc75b34fcfed245d1e.tar.gz
forums-cb427774a6bcb3169bc0e4cc75b34fcfed245d1e.tar.bz2
forums-cb427774a6bcb3169bc0e4cc75b34fcfed245d1e.tar.xz
forums-cb427774a6bcb3169bc0e4cc75b34fcfed245d1e.zip
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
-rw-r--r--phpBB/viewtopic.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 658ff56e4a..1bc7ef27d9 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -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