]> git.mjollnir.org Git - moodle.git/commitdiff
output: MDL-19797 fix some fallback code in print_header.
authortjhunt <tjhunt>
Sat, 3 Oct 2009 08:54:30 +0000 (08:54 +0000)
committertjhunt <tjhunt>
Sat, 3 Oct 2009 08:54:30 +0000 (08:54 +0000)
admin/upgradesettings.php
lib/outputrenderers.php

index 132fee8e50dd94921137995a547913b83ca1b4a5..e1a829f317391a61cd067c23f7c700e47fe604db 100644 (file)
@@ -13,6 +13,7 @@ require_login(0, false);
 
 $adminroot = admin_get_root(); // need all settings
 admin_externalpage_setup('upgradesettings'); // now hidden page
+$PAGE->set_generaltype('maintenance');
 
 // now we'll deal with the case that the admin has submitted the form with new settings
 if ($data = data_submitted() and confirm_sesskey()) {
index 8a6724ee6829401336836f964ca73dc403bbe1b4..358a97608c89a74081ba566c770beaaec60cf3a9 100644 (file)
@@ -692,6 +692,7 @@ class moodle_core_renderer extends moodle_renderer_base {
 
         // Find the appropriate page template, based on $this->page->generaltype.
         $templatefile = $this->page->theme->template_for_page($this->page->generaltype);
+
         if ($templatefile) {
             // Render the template.
             $template = $this->render_page_template($templatefile);
@@ -711,12 +712,15 @@ class moodle_core_renderer extends moodle_renderer_base {
 
         if (empty($this->contenttype)) {
             debugging('The layout template did not call $OUTPUT->doctype()');
-            $this->doctype();
+            $header = $this->doctype() . $header;
         }
 
+        
         send_headers($this->contenttype, $this->page->cacheable);
+
         $this->opencontainers->push('header/footer', $footer);
         $this->page->set_state(moodle_page::STATE_IN_BODY);
+
         return $header . $this->skip_link_target();
     }