Commit 99233a9c authored by Dries's avatar Dries
Browse files

- Patch #19590 by Moshe: lazy initialization of the theme system.  Improves
  performance of pages that don't need the theme system (such as RSS feeds)
  and makes it easier to set a custom theme.
parent a9091183
......@@ -1905,7 +1905,4 @@ function clone($object) {
// Initialize the localization system.
$locale = locale_initialize();
// Initialize the enabled theme.
$theme = init_theme();
?>
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment