output: MDL-19797 fix some fallback code in print_header.

This commit is contained in:
tjhunt 2009-10-03 08:54:30 +00:00
parent f94f09b523
commit 67e84a7f5e
2 changed files with 6 additions and 1 deletions

View file

@ -13,6 +13,7 @@ require_login(0, false);
$adminroot = admin_get_root(); // need all settings $adminroot = admin_get_root(); // need all settings
admin_externalpage_setup('upgradesettings'); // now hidden page 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 // now we'll deal with the case that the admin has submitted the form with new settings
if ($data = data_submitted() and confirm_sesskey()) { if ($data = data_submitted() and confirm_sesskey()) {

View file

@ -692,6 +692,7 @@ class moodle_core_renderer extends moodle_renderer_base {
// Find the appropriate page template, based on $this->page->generaltype. // Find the appropriate page template, based on $this->page->generaltype.
$templatefile = $this->page->theme->template_for_page($this->page->generaltype); $templatefile = $this->page->theme->template_for_page($this->page->generaltype);
if ($templatefile) { if ($templatefile) {
// Render the template. // Render the template.
$template = $this->render_page_template($templatefile); $template = $this->render_page_template($templatefile);
@ -711,12 +712,15 @@ class moodle_core_renderer extends moodle_renderer_base {
if (empty($this->contenttype)) { if (empty($this->contenttype)) {
debugging('The layout template did not call $OUTPUT->doctype()'); debugging('The layout template did not call $OUTPUT->doctype()');
$this->doctype(); $header = $this->doctype() . $header;
} }
send_headers($this->contenttype, $this->page->cacheable); send_headers($this->contenttype, $this->page->cacheable);
$this->opencontainers->push('header/footer', $footer); $this->opencontainers->push('header/footer', $footer);
$this->page->set_state(moodle_page::STATE_IN_BODY); $this->page->set_state(moodle_page::STATE_IN_BODY);
return $header . $this->skip_link_target(); return $header . $this->skip_link_target();
} }