From a181471f4eedad115211f2ada15b2ba55db3a801 Mon Sep 17 00:00:00 2001 From: Brendan Heywood Date: Thu, 23 Jun 2016 17:27:52 +1000 Subject: [PATCH] MDL-55001 theme_clean: Avoid redirects in home url --- theme/clean/classes/core_renderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/clean/classes/core_renderer.php b/theme/clean/classes/core_renderer.php index 74e7b073c43..14f8eeb900e 100644 --- a/theme/clean/classes/core_renderer.php +++ b/theme/clean/classes/core_renderer.php @@ -85,7 +85,7 @@ class theme_clean_core_renderer extends theme_bootstrapbase_core_renderer { array('class' => 'small-logo')); if ($returnlink) { - $logocontainer = html_writer::link($CFG->wwwroot, $image, + $logocontainer = html_writer::link(new moodle_url('/'), $image, array('class' => 'small-logo-container', 'title' => get_string('home'))); } else { $logocontainer = html_writer::tag('span', $image, array('class' => 'small-logo-container')); @@ -113,7 +113,7 @@ class theme_clean_core_renderer extends theme_bootstrapbase_core_renderer { $sitename = format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID))); if ($returnlink) { - return html_writer::link($CFG->wwwroot, $sitename, array('class' => 'brand', 'title' => get_string('home'))); + return html_writer::link(new moodle_url('/'), $sitename, array('class' => 'brand', 'title' => get_string('home'))); } return html_writer::tag('span', $sitename, array('class' => 'brand'));