]> git.mjollnir.org Git - moodle.git/commitdiff
fixed warning from clone($SITE) during site setup; merged from MOODLE_16_STABLE
authorskodak <skodak>
Mon, 29 May 2006 20:33:12 +0000 (20:33 +0000)
committerskodak <skodak>
Mon, 29 May 2006 20:33:12 +0000 (20:33 +0000)
lib/setup.php

index ff88d84fdca654a34a8a9c6a7b22079f34d747c7..120bf33e7a9c802d3494b44be6989ab92ff9be9b 100644 (file)
@@ -225,15 +225,17 @@ global $HTTPSPAGEREQUIRED;
          * If $SITE global from {@link get_site()} is set then SITEID to $SITE->id, otherwise set to 1.
          */
         define('SITEID', $SITE->id);
+        /// And the 'default' course
+        $COURSE = clone($SITE);   // For now.  This will usually get reset later in require_login() etc.
     } else {
         /**
          * @ignore
          */
         define('SITEID', 1);
-        define('COURSEID', 1);
+        /// And the 'default' course
+        $COURSE = new object;  // no site created yet
+        $COURSE->id = 1;
     }
-/// And the 'default' course
-    $COURSE = clone($SITE);   // For now.  This will usually get reset later in require_login() etc.
 
 
 /// Set a default enrolment configuration (see bug 1598)