proper fix for MDL-6926

This commit is contained in:
toyomoyo
2006-10-17 04:45:21 +00:00
parent 9b6c468b16
commit 33dc359ccc
2 changed files with 4 additions and 8 deletions
+3 -4
View File
@@ -4,8 +4,7 @@
// If no post is given, displays all posts in a discussion
require_once("../../config.php");
require_once("lib.php");
$d = required_param('d', PARAM_INT); // Discussion ID
$parent = optional_param('parent', 0, PARAM_INT); // If set, then display this post and all children.
$mode = optional_param('mode', 0, PARAM_INT); // If set, changes the layout of the thread
@@ -29,7 +28,8 @@
if (!$cm = get_coursemodule_from_instance('forum', $forum->id, $course->id)) {
error('Course Module ID was incorrect');
}
// move this down fix for MDL-6926
require_once("lib.php");
require_course_login($course, false, $cm);
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
@@ -192,7 +192,6 @@
}
/// Print the controls across the top
echo '<table width="100%"><tr><td width="33%">';
+1 -4
View File
@@ -2410,10 +2410,7 @@ function forum_print_rating_menu($postid, $userid, $scale) {
* @param $forumtype - optional
*/
function forum_print_mode_form($id, $mode, $forumtype='') {
$FORUM_LAYOUT_MODES = array ( FORUM_MODE_FLATOLDEST => get_string('modeflatoldestfirst', 'forum'),
FORUM_MODE_FLATNEWEST => get_string('modeflatnewestfirst', 'forum'),
FORUM_MODE_THREADED => get_string('modethreaded', 'forum'),
FORUM_MODE_NESTED => get_string('modenested', 'forum') );
global $FORUM_LAYOUT_MODES;
echo "<div align=\"center\">";
if ($forumtype == 'single') {