MDL-52862 mod_forum: format non HTML messages in search results

Override messageformat to FORMAT_HTML before calling forum_print_post
This commit is contained in:
Juan Segarra Montesinos
2016-02-15 07:55:22 +01:00
parent 2f45a11ac4
commit 34edbe5733
+5
View File
@@ -296,6 +296,11 @@ foreach ($posts as $post) {
// Prepare a link to the post in context, to be displayed after the forum post.
$fulllink = "<a href=\"discuss.php?d=$post->discussion#p$post->id\">".get_string("postincontext", "forum")."</a>";
// Message is now html format.
if ($post->messageformat != FORMAT_HTML) {
$post->messageformat = FORMAT_HTML;
}
// Now pring the post.
forum_print_post($post, $discussion, $forum, $cm, $course, false, false, false,
$fulllink, '', -99, false);