MDL-24996 - make forum_print_post() to specify context on format_text() calls
authorEloy Lafuente <stronk7@moodle.org>
Tue, 2 Nov 2010 01:59:20 +0000 (01:59 +0000)
committerEloy Lafuente <stronk7@moodle.org>
Tue, 2 Nov 2010 01:59:20 +0000 (01:59 +0000)
mod/forum/lib.php

index 87e50a0..13b5406 100644 (file)
@@ -3285,6 +3285,7 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
     $options = new stdClass();
     $options->para    = false;
     $options->trusted = $post->messagetrust;
+    $options->context = $modcontext;
     if ($link and (strlen(strip_tags($post->message)) > $CFG->forum_longpost)) {
         // Print shortened version
         echo format_text(forum_shorten_post($post->message), $post->messageformat, $options, $course->id);