Skip to content

Commit

Permalink
More fixes to make custom themes work as expected.
Browse files Browse the repository at this point in the history
I think it's pretty much perfect now.
  • Loading branch information
moodler committed Feb 13, 2005
1 parent d57fc78 commit 56766f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/weblib.php
Expand Up @@ -1843,7 +1843,7 @@ function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $force
function theme_setup($theme = '', $params=NULL) {
/// Sets up global variables related to themes

global $CFG, $THEME;
global $CFG, $THEME, $SESSION, $USER;

if (empty($theme)) {
$theme = current_theme();
Expand All @@ -1853,8 +1853,8 @@ function theme_setup($theme = '', $params=NULL) {
if (!$params) {
$params = array();
}
if (!empty($CFG->coursetheme) and !empty($CFG->allowcoursethemes)) { // Course theme can override all others
$params[] = 'forceconfig='.$CFG->coursetheme;
if ($theme != $CFG->theme) {
$params[] = 'forceconfig='.$theme;
}
if ($params) {
$paramstring = '?'.implode('&', $params);
Expand Down

0 comments on commit 56766f8

Please sign in to comment.