mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-39629_master' of git://github.com/kordan/moodle
This commit is contained in:
commit
ac547b717a
@ -30,15 +30,12 @@ if ($hascustommenu) {
|
|||||||
|
|
||||||
/************************************************************************************************/
|
/************************************************************************************************/
|
||||||
if (!empty($PAGE->theme->settings->frontpagelogourl)) {
|
if (!empty($PAGE->theme->settings->frontpagelogourl)) {
|
||||||
$logourl = $PAGE->theme->settings->frontpagelogourl;
|
$logourl = $PAGE->theme->setting_file_url('frontpagelogourl', 'frontpagelogourl');
|
||||||
} else if (!empty($PAGE->theme->settings->customlogourl)) {
|
} else if (!empty($PAGE->theme->settings->customlogourl)) {
|
||||||
$logourl = $PAGE->theme->settings->customlogourl;
|
$logourl = $PAGE->theme->setting_file_url('customlogourl', 'customlogourl');
|
||||||
} else {
|
} else {
|
||||||
$logourl = $OUTPUT->pix_url('logo', 'theme');
|
$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;
|
$hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
|
||||||
|
|
||||||
|
@ -40,10 +40,7 @@ if ($hascustommenu) {
|
|||||||
|
|
||||||
/************************************************************************************************/
|
/************************************************************************************************/
|
||||||
if (!empty($PAGE->theme->settings->customlogourl)) {
|
if (!empty($PAGE->theme->settings->customlogourl)) {
|
||||||
$logourl = $PAGE->theme->settings->customlogourl;
|
$logourl = $PAGE->theme->setting_file_url('customlogourl', 'customlogourl');
|
||||||
if (strtolower(substr($logourl, 0, 4)) != 'http') {
|
|
||||||
$logourl = $CFG->wwwroot.'/'.$logourl;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$logourl = $OUTPUT->pix_url('logo_small', 'theme');
|
$logourl = $OUTPUT->pix_url('logo_small', 'theme');
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,7 @@ if ($hascustommenu) {
|
|||||||
|
|
||||||
/************************************************************************************************/
|
/************************************************************************************************/
|
||||||
if (!empty($PAGE->theme->settings->customlogourl)) {
|
if (!empty($PAGE->theme->settings->customlogourl)) {
|
||||||
$logourl = $PAGE->theme->settings->customlogourl;
|
$logourl = $PAGE->theme->setting_file_url('customlogourl', 'customlogourl');
|
||||||
if (strtolower(substr($logourl, 0, 4)) != 'http') {
|
|
||||||
$logourl = $CFG->wwwroot.'/'.$logourl;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$logourl = $OUTPUT->pix_url('logo_small', 'theme');
|
$logourl = $OUTPUT->pix_url('logo_small', 'theme');
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,7 @@ if ($ADMIN->fulltree) {
|
|||||||
$name = 'theme_formal_white/customlogourl';
|
$name = 'theme_formal_white/customlogourl';
|
||||||
$title = get_string('customlogourl','theme_formal_white');
|
$title = get_string('customlogourl','theme_formal_white');
|
||||||
$description = get_string('customlogourldesc', 'theme_formal_white');
|
$description = get_string('customlogourldesc', 'theme_formal_white');
|
||||||
$default = '';
|
$setting = new admin_setting_configstoredfile($name, $title, $description, 'customlogourl');
|
||||||
$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.
|
|
||||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||||
$settings->add($setting);
|
$settings->add($setting);
|
||||||
|
|
||||||
@ -59,8 +58,7 @@ if ($ADMIN->fulltree) {
|
|||||||
$name = 'theme_formal_white/frontpagelogourl';
|
$name = 'theme_formal_white/frontpagelogourl';
|
||||||
$title = get_string('frontpagelogourl','theme_formal_white');
|
$title = get_string('frontpagelogourl','theme_formal_white');
|
||||||
$description = get_string('frontpagelogourldesc', 'theme_formal_white');
|
$description = get_string('frontpagelogourldesc', 'theme_formal_white');
|
||||||
$default = '';
|
$setting = new admin_setting_configstoredfile($name, $title, $description, 'frontpagelogourl');
|
||||||
$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.
|
|
||||||
$setting->set_updatedcallback('theme_reset_all_caches');
|
$setting->set_updatedcallback('theme_reset_all_caches');
|
||||||
$settings->add($setting);
|
$settings->add($setting);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user