diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-02-20 13:39:29 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-02-20 13:39:29 +0000 |
commit | 8e0d6b4690866b3dd39bd4128e9845d9fb79b6fc (patch) | |
tree | 0b10f4b0784943d745af01210f76c6d3b2018777 /includes | |
parent | 7b699125fb34817ea467cc4062f05398a0af6002 (diff) | |
download | brdo-8e0d6b4690866b3dd39bd4128e9845d9fb79b6fc.tar.gz brdo-8e0d6b4690866b3dd39bd4128e9845d9fb79b6fc.tar.bz2 |
- Patch #224142 by jvandyk: tiny performance improvement for theme().
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 69e026c12..ea55154f6 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -576,7 +576,7 @@ function theme() { global $theme_path; $temp = $theme_path; // point path_to_theme() to the currently used theme path: - $theme_path = $hooks[$hook]['theme path']; + $theme_path = $info['theme path']; // Include a file if the theme function or preprocess function is held elsewhere. if (!empty($info['file'])) { @@ -612,7 +612,7 @@ function theme() { if (isset($theme_engine)) { // If theme or theme engine is implementing this, it may have // a different extension and a different renderer. - if ($hooks[$hook]['type'] != 'module') { + if ($info['type'] != 'module') { if (function_exists($theme_engine .'_render_template')) { $render_function = $theme_engine .'_render_template'; } @@ -652,9 +652,9 @@ function theme() { } if (empty($template_file)) { - $template_file = $hooks[$hook]['template'] . $extension; - if (isset($hooks[$hook]['path'])) { - $template_file = $hooks[$hook]['path'] .'/'. $template_file; + $template_file = $info['template'] . $extension; + if (isset($info['path'])) { + $template_file = $info['path'] .'/'. $template_file; } } $output = $render_function($template_file, $variables); |