]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15565, fix bug of maintenance mode alert reminder
authordongsheng <dongsheng>
Wed, 23 Jul 2008 03:18:02 +0000 (03:18 +0000)
committerdongsheng <dongsheng>
Wed, 23 Jul 2008 03:18:02 +0000 (03:18 +0000)
lib/weblib.php

index 173ab36ea75c87c53fcdb5f04e964985df089a4d..5681694699c967bf9b38ea1b98773121b2537b02 100644 (file)
@@ -2401,6 +2401,14 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
         $button = '&nbsp;';
     }
 
+    if (file_exists($CFG->dataroot.'/'.SITEID.'/maintenance.html')) {
+        $button = '<a href="'.$CFG->wwwroot.'/admin/maintenance.php">'.get_string('maintenancemode', 'admin').'</a> '.$button;
+        if(!empty($title)) {
+            $title .= ' - ';
+        }
+        $title .= get_string('maintenancemode', 'admin');
+    }
+
     if (!$menu and $navigation) {
         if (empty($CFG->loginhttps)) {
             $wwwroot = $CFG->wwwroot;
@@ -2497,14 +2505,6 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
     $title = format_string($title);    // fix for MDL-8582
     $title = str_replace('"', '&quot;', $title);
 
-    if (file_exists($CFG->dataroot.'/'.SITEID.'/maintenance.html')) {
-        $button = '<a href="'.$CFG->wwwroot.'/admin/maintenance.php">'.get_string('maintenancemode', 'admin').'</a> '.$button;
-        if(!empty($title)) {
-            $title .= ' - ';
-        }
-        $title .= get_string('maintenancemode', 'admin');
-    }
-
     // Create class and id for this page
 
     page_id_and_class($pageid, $pageclass);