From: tjhunt Date: Fri, 17 Jul 2009 06:51:25 +0000 (+0000) Subject: themes: MDL-19077 better handling of top of body code for legacy themes. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=61f879d293cbe548c0a25d67f973eddf38c68d5b;p=moodle.git themes: MDL-19077 better handling of top of body code for legacy themes. --- diff --git a/lib/outputlib.php b/lib/outputlib.php index d0bf74c254..b60f4f7ad4 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -1956,7 +1956,6 @@ class moodle_core_renderer extends moodle_renderer_base { ob_start(); include($this->page->theme->dir . '/header.html'); - $this->page->requires->get_top_of_body_code(); echo ''; foreach ($lt as $column) { @@ -1991,7 +1990,21 @@ class moodle_core_renderer extends moodle_renderer_base { $output = ob_get_contents(); ob_end_clean(); + // Put in the start of body code. Bit of a hack, put it in before the first + //
standard_top_of_body_html() . + substr($output, $divpos); + + // Put in the end token before the end of body. $output = str_replace('', self::END_HTML_TOKEN . '', $output); + // Make sure we use the correct doctype. $output = preg_replace('/()/s', $this->doctype(), $output);