Some changes in the way theme setup is achieved, there is now a function

for it called theme_setup
This commit is contained in:
moodler 2005-01-31 05:59:13 +00:00
parent d65a650133
commit d74d4f2053
2 changed files with 47 additions and 27 deletions

View file

@ -223,20 +223,8 @@ global $THEME;
if (!isset($CFG->theme)) {
$CFG->theme = 'standard';
}
$currenttheme = current_theme();
include($CFG->dirroot .'/theme/'. $currenttheme .'/config.php');
if (empty($CFG->custompix)) { // Could be set in the above file
$CFG->pixpath = $CFG->wwwroot .'/pix';
$CFG->modpixpath = $CFG->wwwroot .'/mod';
} else {
$CFG->pixpath = $CFG->wwwroot .'/theme/'. $currenttheme .'/pix';
$CFG->modpixpath = $CFG->wwwroot .'/theme/'. $currenttheme .'/pix/mod';
}
$CFG->stylesheet = $CFG->wwwroot .'/theme/'. $currenttheme .'/styles.php';
$CFG->header = $CFG->dirroot .'/theme/'. $currenttheme .'/header.html';
$CFG->footer = $CFG->dirroot .'/theme/'. $currenttheme .'/footer.html';
theme_setup(); // Sets up theme global variables
/// A hack to get around magic_quotes_gpc being turned off