mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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:
parent
7899519293
commit
86cc3e75a4
1 changed files with 7 additions and 1 deletions
|
@ -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'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue