Fixing Theme Config Variables MDL-6784

This commit is contained in:
skodak
2006-10-09 10:12:41 +00:00
parent 4dd5d7513d
commit a44091bffe
23 changed files with 76 additions and 59 deletions
+7 -4
View File
@@ -496,15 +496,18 @@ $CFG->os = PHP_OS;
/// Load up theme variables (colours etc)
if (!isset($CFG->themedir)) {
$CFG->themedir = $CFG->dirroot.'/theme/';
$CFG->themewww = $CFG->wwwroot.'/theme/';
$CFG->themedir = $CFG->dirroot.'/theme';
$CFG->themewww = $CFG->wwwroot.'/theme';
}
$CFG->httpsthemewww = $CFG->themewww;
if (isset($_GET['theme'])) {
if ($CFG->allowthemechangeonurl || confirm_sesskey()) {
if (!detect_munged_arguments($_GET['theme'], 0) and file_exists($CFG->themedir. $_GET['theme'])) {
$SESSION->theme = $_GET['theme'];
$themename = clean_param($_GET['theme'], PARAM_SAFEDIR);
if (($themename != '') and file_exists($CFG->themedir.'/'.$themename)) {
$SESSION->theme = $themename;
}
unset($themename);
}
}