diff --git a/checkin_notes b/checkin_notes index ea7f055da8..50d041bfe2 100644 --- a/checkin_notes +++ b/checkin_notes @@ -345,3 +345,10 @@ Rom Jan 11 2008 Rom Jan 11 2008 (HEAD) - Tag for 6.1.6 release, all platforms boinc_core_release_6_1_6 + +David Jan 11 2008 + - web: fix bug there message link not correct in search results + fixes #539 + + html/user/ + forum_search_action.php diff --git a/html/user/forum_search_action.php b/html/user/forum_search_action.php index 4679e8590d..646ae183c1 100644 --- a/html/user/forum_search_action.php +++ b/html/user/forum_search_action.php @@ -73,7 +73,7 @@ function search_post_content( if ($forum!="" && $forum!="all"){ $optional_join = " LEFT JOIN DBNAME.thread ON post.thread = thread.id"; } - $query = "select *,post.id as postid from DBNAME.post".$optional_join." where content like '".$search_string."'"; + $query = "select *, DBNAME.post.id as postid from DBNAME.post".$optional_join." where content like '".$search_string."'"; if ($forum!="" && $forum!="all"){ $query.=" and forum = ".intval($forum->id); } @@ -168,14 +168,17 @@ if (count($posts)){ $options = get_output_options($logged_in_user); $options->setHighlightTerms($search_list); foreach ($posts as $post) { + $post->id = $post->postid; $thread = BoincThread::lookup_id($post->thread); if (!$thread) continue; $forum = BoincForum::lookup_id($thread->forum); if (!$forum) continue; if (!is_forum_visible_to_user($forum, $logged_in_user)) continue; - if (($show_hidden_posts == false) && ($thread->hidden)) continue; - if (($show_hidden_posts == false) && ($post->hidden)) continue; + if (!$show_hidden_posts) { + if ($thread->hidden) continue; + if ($post->hidden) continue; + } show_post_and_context($post, $thread, $forum, $options, $n); $n++; }