diff --git a/theme/formal_white/layout/frontpage.php b/theme/formal_white/layout/frontpage.php index 4105a295a23..be8909036d7 100644 --- a/theme/formal_white/layout/frontpage.php +++ b/theme/formal_white/layout/frontpage.php @@ -36,6 +36,9 @@ if (!empty($PAGE->theme->settings->frontpagelogo)) { } else { $logourl = $OUTPUT->pix_url('logo', 'theme'); } +if (strtolower(substr($logourl, 0, 4)) != 'http') { + $logourl = $CFG->wwwroot.'/'.$logourl; +} $hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe; diff --git a/theme/formal_white/layout/general.php b/theme/formal_white/layout/general.php index 8d0a497a370..2688a0983ee 100644 --- a/theme/formal_white/layout/general.php +++ b/theme/formal_white/layout/general.php @@ -31,6 +31,9 @@ if ($hascustommenu) { /************************************************************************************************/ if (!empty($PAGE->theme->settings->logo)) { $logourl = $PAGE->theme->settings->logo; + if (strtolower(substr($logourl, 0, 4)) != 'http') { + $logourl = $CFG->wwwroot.'/'.$logourl; + } } else { $logourl = $OUTPUT->pix_url('logo_small', 'theme'); } @@ -217,7 +220,7 @@ if ($hasfooter) { - standard_footer_html(); ?> diff --git a/theme/formal_white/settings.php b/theme/formal_white/settings.php index a12cce82813..569495ce855 100644 --- a/theme/formal_white/settings.php +++ b/theme/formal_white/settings.php @@ -38,7 +38,7 @@ if ($ADMIN->fulltree) { $title = get_string('logo','theme_formal_white'); $description = get_string('logodesc', 'theme_formal_white'); $default = ''; - $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL); + $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_RAW); // we want it accepting ../ at the beginning. Security is not at its top but Moodle trusts admins. $settings->add($setting); // Custom front page site logo setting @@ -46,7 +46,7 @@ if ($ADMIN->fulltree) { $title = get_string('frontpagelogo','theme_formal_white'); $description = get_string('frontpagelogodesc', 'theme_formal_white'); $default = ''; - $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL); + $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_RAW); // we want it accepting ../ at the beginning. Security is not at its top but Moodle trusts admins. $settings->add($setting); // page header background colour setting