Now discussion->name works under filterall.
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
}
|
||||
} else {
|
||||
$parent = $discussion->firstpost;
|
||||
$navtail = "$discussion->name";
|
||||
$navtail = format_string($discussion->name);
|
||||
}
|
||||
|
||||
if (! $post = forum_get_post_full($parent)) {
|
||||
@@ -104,7 +104,7 @@
|
||||
}
|
||||
|
||||
if (empty($navtail)) {
|
||||
$navtail = "<a href=\"discuss.php?d=$discussion->id\">$discussion->name</a> -> ".format_string($post->subject);
|
||||
$navtail = "<a href=\"discuss.php?d=$discussion->id\">".format_string($discussion->name,true)."</a> -> ".format_string($post->subject);
|
||||
}
|
||||
|
||||
$navmiddle = "<a href=\"../forum/index.php?id=$course->id\">".get_string("forums", "forum")."</a> -> <a href=\"../forum/view.php?f=$forum->id\">".format_string($forum->name,true)."</a>";
|
||||
@@ -112,11 +112,11 @@
|
||||
$searchform = forum_search_form($course);
|
||||
|
||||
if ($course->category) {
|
||||
print_header("$course->shortname: $discussion->name", "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($discussion->name), "$course->fullname",
|
||||
"<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
$navmiddle -> $navtail", "", "", true, $searchform, navmenu($course, $cm));
|
||||
} else {
|
||||
print_header("$course->shortname: $discussion->name", "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($discussion->name), "$course->fullname",
|
||||
"$navmiddle -> $navtail", "", "", true, $searchform, navmenu($course, $cm));
|
||||
}
|
||||
|
||||
|
||||
+12
-4
@@ -477,7 +477,7 @@ function forum_cron () {
|
||||
$posttext .= "\n \n";
|
||||
$posttext .= "$course->shortname -> $strforums -> ".format_string($forum->name,true);
|
||||
if ($discussion->name != $forum->name) {
|
||||
$posttext .= " -> $discussion->name";
|
||||
$posttext .= " -> ".format_string($discussion->name,true);
|
||||
}
|
||||
$posttext .= "\n";
|
||||
|
||||
@@ -488,7 +488,7 @@ function forum_cron () {
|
||||
if ($discussion->name == $forum->name) {
|
||||
$posthtml .= "</font></p>";
|
||||
} else {
|
||||
$posthtml .= " -> <a target=\"_blank\" href=\"$CFG->wwwroot/mod/forum/discuss.php?d=$discussion->id\">$discussion->name</a></font></p>";
|
||||
$posthtml .= " -> <a target=\"_blank\" href=\"$CFG->wwwroot/mod/forum/discuss.php?d=$discussion->id\">".format_string($discussion->name,true)."</a></font></p>";
|
||||
}
|
||||
$posthtml .= '<p>';
|
||||
|
||||
@@ -621,7 +621,7 @@ function forum_make_mail_text($course, $forum, $discussion, $post, $userfrom, $u
|
||||
$posttext = "$course->shortname -> $strforums -> ".format_string($forum->name,true);
|
||||
|
||||
if ($discussion->name != $forum->name) {
|
||||
$posttext .= " -> $discussion->name";
|
||||
$posttext .= " -> ".format_string($discussion->name,true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -677,7 +677,7 @@ function forum_make_mail_html($course, $forum, $discussion, $post, $userfrom, $u
|
||||
if ($discussion->name == $forum->name) {
|
||||
$posthtml .= "</font></p>";
|
||||
} else {
|
||||
$posthtml .= " » <a target=\"_blank\" href=\"$CFG->wwwroot/mod/forum/discuss.php?d=$discussion->id\">$discussion->name</a></font></p>";
|
||||
$posthtml .= " » <a target=\"_blank\" href=\"$CFG->wwwroot/mod/forum/discuss.php?d=$discussion->id\">".format_string($discussion->name,true)."</a></font></p>";
|
||||
}
|
||||
$posthtml .= forum_make_mail_post($post, $userfrom, $userto, $course, false, $canreply, false, false);
|
||||
|
||||
@@ -2681,6 +2681,8 @@ function forum_print_discussion($course, $forum, $discussion, $post, $mode, $can
|
||||
/// Add the forum id to the post object - used by read tracking.
|
||||
$post->forum = $forum->id;
|
||||
|
||||
$post->subject = format_string($post->subject);
|
||||
|
||||
if ($CFG->forum_trackreadposts) {
|
||||
$user_read_array = forum_tp_get_discussion_read_records($USER->id, $post->discussion);
|
||||
} else {
|
||||
@@ -2753,6 +2755,8 @@ function forum_print_posts_flat($discussion, $courseid, $direction, $ratings, $r
|
||||
$post->forum = 0;
|
||||
}
|
||||
|
||||
$post->subject = format_string($post->subject);
|
||||
|
||||
$ownpost = ($USER->id == $post->userid);
|
||||
if (forum_print_post($post, $courseid, $ownpost, $reply, $link, $ratings,
|
||||
'', '', (isset($user_read_array[$post->id]) || forum_tp_is_post_old($post)))) {
|
||||
@@ -2785,6 +2789,8 @@ function forum_print_posts_threaded($parent, $courseid, $depth, $ratings, $reply
|
||||
$post->forum = 0;
|
||||
}
|
||||
|
||||
$post->subject = format_string($post->subject);
|
||||
|
||||
if (forum_print_post($post, $courseid, $ownpost, $reply, $link, $ratings,
|
||||
'', '', (isset($user_read_array[$post->id]) || forum_tp_is_post_old($post)))) {
|
||||
$ratingsmenuused = true;
|
||||
@@ -2842,6 +2848,8 @@ function forum_print_posts_nested($parent, $courseid, $ratings, $reply, &$user_r
|
||||
} else {
|
||||
$post->forum = 0;
|
||||
}
|
||||
|
||||
$post->subject = format_string($post->subject);
|
||||
|
||||
if (forum_print_post($post, $courseid, $ownpost, $reply, $link, $ratings,
|
||||
'', '', (isset($user_read_array[$post->id]) || forum_tp_is_post_old($post)))) {
|
||||
|
||||
+3
-3
@@ -465,7 +465,7 @@
|
||||
|
||||
$course = get_record('course', 'id', $forum->course);
|
||||
$strforums = get_string("modulenameplural", "forum");
|
||||
print_header_simple("$discussion->name: ".format_string($post->subject), "",
|
||||
print_header_simple(format_string($discussion->name).": ".format_string($post->subject), "",
|
||||
"<a href=\"../forum/index.php?id=$course->id\">$strforums</a> ->
|
||||
<a href=\"view.php?f=$forum->id\">".format_string($forum->name,true)."</a> ->
|
||||
<a href=\"discuss.php?d=$discussion->id\">".format_string($post->subject,true)."</a> -> ".
|
||||
@@ -535,12 +535,12 @@
|
||||
}
|
||||
|
||||
if ($course->category) {
|
||||
print_header("$course->shortname: $discussion->name: ".format_string($toppost->subject), "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($discussion->name).": ".format_string($toppost->subject), "$course->fullname",
|
||||
"<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
$navmiddle -> $navtail", $formstart, "", true, "", navmenu($course, $cm));
|
||||
|
||||
} else {
|
||||
print_header("$course->shortname: $discussion->name: ".format_string($toppost->subject), "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($discussion->name).": ".format_string($toppost->subject), "$course->fullname",
|
||||
"$navmiddle -> $navtail", "$formstart", "", true, "", navmenu($course, $cm));
|
||||
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
$fullsubject = "<a href=\"view.php?f=$forum->id\">".format_string($forum->name,true)."</a>";
|
||||
if ($forum->type != 'single') {
|
||||
$fullsubject .= " -> <a href=\"discuss.php?d=$discussion->id\">$discussion->name</a>";
|
||||
$fullsubject .= " -> <a href=\"discuss.php?d=$discussion->id\">".format_string($discussion->name,true)."</a>";
|
||||
if ($post->parent != 0) {
|
||||
$fullsubject .= " -> <a href=\"discuss.php?d=$post->discussion&parent=$post->id\">".format_string($post->subject,true)."</a>";
|
||||
}
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@
|
||||
|
||||
$fullsubject = "<a href=\"view.php?f=$forum->id\">".format_string($forum->name,true)."</a>";
|
||||
if ($forum->type != 'single') {
|
||||
$fullsubject .= " -> <a href=\"discuss.php?d=$discussion->id\">$discussion->name</a>";
|
||||
$fullsubject .= " -> <a href=\"discuss.php?d=$discussion->id\">".format_string($discussion->name,true)."</a>";
|
||||
if ($post->parent != 0) {
|
||||
$fullsubject .= " -> <a href=\"discuss.php?d=$post->discussion&parent=$post->id\">".format_string($post->subject,true)."</a>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user