]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some recent buggy logic! Thanks, Eagle Eye!
authormoodler <moodler>
Sat, 29 Jan 2005 12:11:45 +0000 (12:11 +0000)
committermoodler <moodler>
Sat, 29 Jan 2005 12:11:45 +0000 (12:11 +0000)
lib/weblib.php

index e06cb4fec8d580a05318f3f49591728edff3e62a..a30870ea3a1717831dac1c6df8f2cea5c18e2cef 100644 (file)
@@ -1636,9 +1636,9 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta=
     if (substr($path, -1) == '/') {
         $path .= 'index';
     }
-    if (empty($path) or $path = '/index') {
+    if (empty($path) or $path == '/index') {
         $pageid    = 'site-index';
-        $pageclass = 'course course-'.SITEID;
+        $pageclass = 'course';
     } else {
         $pageid    = str_replace('/', '-', $path);
         $pageclass = explode('-', $pageid);
@@ -1648,6 +1648,8 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta=
 
     if (isset($course->id)) {
         $pageclass .= ' course-'.$course->id;
+    } else {
+        $pageclass .= ' course-'.SITEID;
     }
 
     $bodytags .= ' class="'.$pageclass.'" id="'.$pageid.'"';