Two new variables $CFG->themedir and $CFG->themewww which tell us where the

themes we use are located.

For most sites these will stay in moodle/theme but it's nice for multi-hosting
sites to have the option to specify differently.
This commit is contained in:
moodler 2005-03-14 13:23:38 +00:00
parent 7899519293
commit 86cc3e75a4

View file

@ -296,9 +296,15 @@ global $THEME;
/// Load up theme variables (colours etc)
if (!isset($CFG->themedir)) {
$CFG->themedir = $CFG->dirroot.'/theme/';
$CFG->themewww = $CFG->wwwroot.'/theme/';
}
if (isset($_GET['theme'])) {
if ($CFG->allowthemechangeonurl || confirm_sesskey()) {
if (!detect_munged_arguments($_GET['theme'], 0) and file_exists($CFG->dirroot .'/theme/'. $_GET['theme'])) {
if (!detect_munged_arguments($_GET['theme'], 0) and file_exists($CFG->themedir. $_GET['theme'])) {
$SESSION->theme = $_GET['theme'];
}
}