Changeset 15291 for trunk/modules
- Timestamp:
- 06/29/11 20:20:06 (11 months ago)
- File:
-
- 1 edited
-
trunk/modules/boonex/forum/classes/Forum.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/boonex/forum/classes/Forum.php
r15211 r15291 86 86 reset($ws); 87 87 while (list (,$w) = each ($ws)) 88 if ($w) 89 $r['topic_title'] = preg_replace ("/($w)/i", "<span style=\"background-color:yellow\">$w</span>", $r['topic_title']); 90 88 if ($w) { 89 $wreg = str_replace(array('(', ')'), array('\\(', '\\)'), $w); 90 $r['topic_title'] = preg_replace ("/($wreg)/i", "<span style=\"background-color:yellow\">$w</span>", $r['topic_title']); 91 } 91 92 92 93 encode_post_text($r['cat_name']); … … 113 114 if ($w) 114 115 { 116 $wreg = str_replace(array('(', ')'), array('\\(', '\\)'), $w); 115 117 $ind = eregi( "([^>]*<)", $r['post_text'], $ind ); // html tags? 116 118 if ($ind) 117 $r['post_text'] = preg_replace("/($w )(?=[^>]*<)/i", "<span style=\"background-color:yellow\">$w</span>", "<div>{$r['post_text']}</div>");119 $r['post_text'] = preg_replace("/($wreg)(?=[^>]*<)/i", "<span style=\"background-color:yellow\">$w</span>", "<div>{$r['post_text']}</div>"); 118 120 else 119 $r['post_text'] = preg_replace ("/($w )/i", "<span style=\"background-color:yellow\">$w</span>", $r['post_text']);121 $r['post_text'] = preg_replace ("/($wreg)/i", "<span style=\"background-color:yellow\">$w</span>", $r['post_text']); 120 122 } 121 123 … … 125 127 126 128 reset($ws); 127 while (list (,$w) = each ($ws)) 128 $r['topic_title'] = preg_replace ("/($w)/i", "<span style=\"background-color:yellow\">$w</span>", $r['topic_title']); 129 129 while (list (,$w) = each ($ws)) { 130 $wreg = str_replace(array('(', ')'), array('\\(', '\\)'), $w); 131 $r['topic_title'] = preg_replace ("/($wreg)/i", "<span style=\"background-color:yellow\">$w</span>", $r['topic_title']); 132 } 130 133 131 134 encode_post_text($r['cat_name']);
Note: See TracChangeset
for help on using the changeset viewer.