From 71767204c95fc235a382b195fb15f37886040a40 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 16 Jan 2004 10:51:24 +0000 Subject: [PATCH] Pass courseid to format_text explicitly --- mod/forum/lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index cdf58f4c99..ccde2230d9 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1126,7 +1126,7 @@ function forum_make_mail_post(&$post, $user, $touser, $course, $output .= ""; } - $output .= format_text($post->message, $post->format); + $output .= format_text($post->message, $post->format, NULL, $course->id); $output .= "

"; @@ -1231,7 +1231,7 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link if ($link and (strlen(strip_tags($post->message)) > $CFG->forum_longpost)) { // Print shortened version - echo format_text(forum_shorten_post($post->message), $post->format); + echo format_text(forum_shorten_post($post->message), $post->format, NULL, $courseid); $numwords = count_words(strip_tags($post->message)); echo "

wwwroot/mod/forum/discuss.php?d=$post->discussion\">"; echo get_string("readtherest", "forum"); @@ -1239,9 +1239,9 @@ function forum_print_post(&$post, $courseid, $ownpost=false, $reply=false, $link } else { // Print whole message if ($highlight) { - echo highlight($highlight, format_text($post->message, $post->format)); + echo highlight($highlight, format_text($post->message, $post->format, NULL, $courseid)); } else { - echo format_text($post->message, $post->format); + echo format_text($post->message, $post->format, NULL, $courseid); } echo $attachedimages; } -- 2.39.5