From 391edc51f929e9aa3bf105626125cb440ddaa2bd Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Thu, 23 Jan 2014 15:35:53 +0000 Subject: [PATCH] MDL-43581 additionalhtmlfooter should be added to every page Not just pages with a visible footer. --- lib/outputrenderers.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index d43d7c794c7..1f39798ca45 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -539,9 +539,6 @@ class core_renderer extends renderer_base {
  • WCAG 1 (2,3) Check
  • '; } - if (!empty($CFG->additionalhtmlfooter)) { - $output .= "\n".$CFG->additionalhtmlfooter; - } return $output; } @@ -563,15 +560,22 @@ class core_renderer extends renderer_base { /** * The standard tags (typically script tags that are not needed earlier) that - * should be output after everything else, . Designed to be called in theme layout.php files. + * should be output after everything else. Designed to be called in theme layout.php files. * * @return string HTML fragment. */ public function standard_end_of_body_html() { + global $CFG; + // This function is normally called from a layout.php file in {@link core_renderer::header()} // but some of the content won't be known until later, so we return a placeholder // for now. This will be replaced with the real content in {@link core_renderer::footer()}. - return $this->unique_end_html_token; + $output = ''; + if (!empty($CFG->additionalhtmlfooter)) { + $output .= "\n".$CFG->additionalhtmlfooter; + } + $output .= $this->unique_end_html_token; + return $output; } /**