Skip to content
Permalink
Browse files

FIxes from tony for highlighting

  • Loading branch information...
moodler
moodler committed Feb 1, 2005
1 parent 4c3911f commit fe98d35d43051a4c86e8fd3893b7b965b3c29a94
Showing with 6 additions and 4 deletions.
  1. +6 −4 mod/forum/search.php
@@ -54,7 +54,9 @@
}
if ($search) {
$strippedsearch = str_replace("user:","",$search);
$strippedsearch = str_replace("subject:","",$strippedsearch);
$strippedsearch = str_replace(""","",$strippedsearch);
if (!$posts = forum_search_posts($searchterms, $course->id, $page*$perpage, $perpage, $totalcount)) {
@@ -97,8 +99,8 @@
error("Could not find forum $discussion->forum");
}
$post->subject = highlight("$search", $post->subject);
$discussion->name = highlight("$search", $discussion->name);
$post->subject = highlight("$strippedsearch", $post->subject);
$discussion->name = highlight("$strippedsearch", $discussion->name);
$fullsubject = "<a href=\"view.php?f=$forum->id\">$forum->name</a>";
if ($forum->type != "single") {
@@ -114,7 +116,7 @@
$post->forum = $forum->id;
$fulllink = "<a href=\"discuss.php?d=$post->discussion#$post->id\">".get_string("postincontext", "forum")."</a>";
forum_print_post($post, $course->id, false, false, false, false, $fulllink, $search);
forum_print_post($post, $course->id, false, false, false, false, $fulllink, $strippedsearch);
echo "<br />";
}

0 comments on commit fe98d35

Please sign in to comment.
You can’t perform that action at this time.