]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13603 fixed course_setup() minor problem with $course in $SITE; merged from...
authorskodak <skodak>
Sat, 23 Feb 2008 12:13:47 +0000 (12:13 +0000)
committerskodak <skodak>
Sat, 23 Feb 2008 12:13:47 +0000 (12:13 +0000)
lib/moodlelib.php

index 213d5c2d92ec1cc9153b7e5ebdeb00503bfbe5bb..d276476cd8df4907f3b7d5a5057bae2bc022c324 100644 (file)
@@ -1763,7 +1763,7 @@ function course_setup($courseorid=0) {
         $COURSE = clone($courseorid);
     } else {
         global $course; // used here only to prevent repeated fetching from DB - may be removed later
-        if (!empty($course->id) and $course->id == SITEID) {
+        if ($courseorid == SITEID) {
             $COURSE = clone($SITE);
         } else if (!empty($course->id) and $course->id == $courseorid) {
             $COURSE = clone($course);