From 352b8da86a46b9018fc86da6aab3b528291f65c3 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 17 Oct 2006 09:10:15 +0000 Subject: [PATCH] Merged two recent checkins from Moodle 1.7, stripslashes and navbar fixes --- mod/forum/post.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/mod/forum/post.php b/mod/forum/post.php index 91345776d3..0b2705ba67 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -46,7 +46,7 @@ } $strforums = get_string('modulenameplural', 'forum'); - if ($course->category) { + if ($course->id != SITEID) { print_header($course->shortname, $course->fullname, "id\">$course->shortname -> id\">$strforums -> @@ -311,6 +311,9 @@ } } + $post->subject = stripslashes_safe($post->subject); + $post->message = stripslashes_safe($post->message); + } else if (!empty($forum)) { // User is starting a new discussion in a forum $SESSION->fromurl = $_SERVER["HTTP_REFERER"]; @@ -668,19 +671,20 @@ } if (empty($post->subject)) { - $formstart = "theform.subject"; + $formstart = 'theform.subject'; } else { - $formstart = ""; + $formstart = ''; } if ($post->parent) { - $navtail = "id\">".format_string($toppost->subject,true)." -> ".get_string("editing", "forum"); + $navtail = ' -> '.format_string($toppost->subject,true).' -> '. + get_string('editing', 'forum'); } else { - $navtail = format_string($toppost->subject); + $navtail = ' -> '.format_string($toppost->subject); } if (empty($post->edit)) { - $post->edit = ""; + $post->edit = ''; } $strforums = get_string("modulenameplural", "forum"); @@ -704,7 +708,7 @@ // Show the discussion name in the breadcrumbs. $strdiscussionname = format_string($discussion->name).':'; } - if ($course->category) { + if ($course->id != SITEID) { print_header("$course->shortname: $strdiscussionname ". format_string($toppost->subject), "$course->fullname", "id\">$course->shortname -> -- 2.39.5