From: dongsheng Date: Wed, 23 Jul 2008 03:18:02 +0000 (+0000) Subject: MDL-15565, fix bug of maintenance mode alert reminder X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a2353e9b0b776442a052060846c29163962f7cb7;p=moodle.git MDL-15565, fix bug of maintenance mode alert reminder --- diff --git a/lib/weblib.php b/lib/weblib.php index 173ab36ea7..5681694699 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2401,6 +2401,14 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $button = ' '; } + if (file_exists($CFG->dataroot.'/'.SITEID.'/maintenance.html')) { + $button = ''.get_string('maintenancemode', 'admin').' '.$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('"', '"', $title); - if (file_exists($CFG->dataroot.'/'.SITEID.'/maintenance.html')) { - $button = ''.get_string('maintenancemode', 'admin').' '.$button; - if(!empty($title)) { - $title .= ' - '; - } - $title .= get_string('maintenancemode', 'admin'); - } - // Create class and id for this page page_id_and_class($pageid, $pageclass);