"MDL-19118, replace course it with course object to improve performance"
authorDongsheng Cai <unoter@gmail.com>
Tue, 16 Mar 2010 08:09:19 +0000 (08:09 +0000)
committerDongsheng Cai <unoter@gmail.com>
Tue, 16 Mar 2010 08:09:19 +0000 (08:09 +0000)
comment/comment_ajax.php
comment/comment_post.php

index 0bb743e..6bbe6a0 100644 (file)
@@ -24,7 +24,7 @@ require_once($CFG->dirroot . '/comment/lib.php');
 $contextid = optional_param('contextid', SYSCONTEXTID, PARAM_INT);
 list($context, $course, $cm) = get_context_info_array($contextid);
 
-require_login($course->id, true, $cm);
+require_login($course, true, $cm);
 
 $err = new stdclass;
 
index 1064cac..c35e8a4 100644 (file)
@@ -30,7 +30,7 @@ if ($context->contextlevel == CONTEXT_MODULE) {
 } else {
     $cm = null;
 }
-require_login($course->id, true, $cm);
+require_login($course, true, $cm);
 
 $err = new stdclass;