MDL-25981 add missing global DB when fetching course modinfo
authorPetr Skoda <commits@skodak.org>
Mon, 31 Jan 2011 21:23:34 +0000 (22:23 +0100)
committerPetr Skoda <commits@skodak.org>
Mon, 31 Jan 2011 21:23:34 +0000 (22:23 +0100)
lib/modinfolib.php

index d5d169e..1265d0e 100644 (file)
@@ -197,7 +197,7 @@ class course_modinfo {
      * @param int $userid User ID
      */
     public function __construct($course, $userid) {
-        global $CFG;
+        global $CFG, $DB;
 
         // Set initial values
         $this->courseid = $course->id;