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:
+7
-1
@@ -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'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user