aboutsummaryrefslogtreecommitdiffstats
path: root/include/template.class.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-03-29 13:30:02 +0000
committerpatdenice <patdenice@piwigo.org>2010-03-29 13:30:02 +0000
commit29d36ffdc36bf20ab43840df9272fac160cbc476 (patch)
tree6df10661fe632fa6a8b78ab32fafba5a76b9851e /include/template.class.php
parent034e75f8ea2fc21f38a623df2f9a362048b4c2a5 (diff)
feature 1502: Allow to have configuration page for each theme.css.
About string for theme has to be saved in language theme directory (about.html) git-svn-id: http://piwigo.org/svn/trunk@5446 68402e56-0260-453c-a942-63ccdbb3a9ee
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];
+ }
}