]> git.mjollnir.org Git - moodle.git/commitdiff
Small tidy-up in print_header_simple. Merged from MOODLE_19_STABLE.
authortjhunt <tjhunt>
Thu, 11 Oct 2007 15:25:27 +0000 (15:25 +0000)
committertjhunt <tjhunt>
Thu, 11 Oct 2007 15:25:27 +0000 (15:25 +0000)
lib/weblib.php

index 50d7cfde67b7f01a4be688c2a567419c3911f669..921db0fe68e9a569548a06397a36dbe94eea7e31 100644 (file)
@@ -2582,14 +2582,12 @@ function print_header_simple($title='', $heading='', $navigation='', $focus='',
 
     global $COURSE, $CFG;
 
-    $shortname ='';
-    if ($COURSE->id != SITEID) {
-        $shortname = '<a href="'.$CFG->wwwroot.'/course/view.php?id='. $COURSE->id .'">'. $COURSE->shortname .'</a> ->';
-    }
-
     // If old style nav prepend course short name otherwise leave $navigation object alone
     if (!is_newnav($navigation)) {
-        $navigation = $shortname.' '.$navigation;
+        if ($COURSE->id != SITEID) {
+            $shortname = '<a href="'.$CFG->wwwroot.'/course/view.php?id='. $COURSE->id .'">'. $COURSE->shortname .'</a> ->';
+            $navigation = $shortname.' '.$navigation;
+        }
     }
 
     $output = print_header($COURSE->shortname .': '. $title, $COURSE->fullname .' '. $heading, $navigation, $focus, $meta,