Fix the display when USER display mode is flat, and a parent is selected.

In this case, the display is temporarily changed to nested
This commit is contained in:
martin
2002-09-02 05:03:54 +00:00
parent 5a83a0a84e
commit e92ea3d85f
+7 -5
View File
@@ -33,11 +33,13 @@
forum_set_display_mode($mode);
if (abs($USER->mode) == 1) { // If flat display then display the lot.
$parent = 0;
}
$displaymode = $USER->mode;
if (!$parent) {
if ($parent) {
if (abs($USER->mode) == 1) { // If flat AND parent, then force nested display this time
$displaymode = 3;
}
} else {
$parent = $discussion->firstpost;
$navtail = "$discussion->name";
}
@@ -67,7 +69,7 @@
"$navmiddle -> $navtail", "", "", true, $updatebutton);
}
forum_print_discussion($course, $forum, $discussion, $post, $USER->mode);
forum_print_discussion($course, $forum, $discussion, $post, $displaymode);
print_footer($course);