diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 3 | ||||
-rw-r--r-- | includes/theme.inc | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc index cfa48aa9d..f3abbac85 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1905,7 +1905,4 @@ if (!user_access('bypass input data check')) { // Initialize the localization system. $locale = locale_initialize(); -// Initialize the enabled theme. -$theme = init_theme(); - ?> diff --git a/includes/theme.inc b/includes/theme.inc index 11004306b..14b2181e3 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -171,8 +171,12 @@ function list_theme_engines($refresh = FALSE) { * An HTML string that generates the themed output. */ function theme() { - global $theme; - global $theme_engine; + global $theme, $theme_engine; + + if (!$theme) { + // Initialize the enabled theme. + $theme = init_theme(); + } $args = func_get_args(); $function = array_shift($args); |