aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/template.class.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/template.class.php b/include/template.class.php
index 2307d9fe2..3a13adf47 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -94,7 +94,7 @@ class Template {
{
$this->set_template_dir($root.'/'.$theme.'/'.$path);
- include($root.'/'.$theme.'/themeconf.inc.php');
+ $themeconf = $this->load_themeconf($root.'/'.$theme);
if (isset($themeconf['parent']) and $themeconf['parent'] != $theme)
{
@@ -573,6 +573,21 @@ class Template {
return $source;
}
+
+ function load_themeconf($dir)
+ {
+ global $themeconfs, $conf, $page;
+
+ $dir = realpath($dir);
+ if (!isset($themeconfs[$dir]))
+ {
+ $themeconf = array();
+ include($dir.'/themeconf.inc.php');
+ // Put themeconf in cache
+ $themeconfs[$dir] = $themeconf;
+ }
+ return $themeconfs[$dir];
+ }
}