aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-04-29 19:57:48 +0000
committerpatdenice <patdenice@piwigo.org>2010-04-29 19:57:48 +0000
commit0a5b09601b647cf22d9bd4ab291c58156931a761 (patch)
tree8157cdf365f34d2590ce14770729c005d5c75cbc /include
parent6506716b114f16d9a9468f62cbe68947a14de9f7 (diff)
feature 1502: Add $themeconf['load_parent_local_head'] parameter
git-svn-id: http://piwigo.org/svn/trunk@6006 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/template.class.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/template.class.php b/include/template.class.php
index 3898b43da..d3608af4b 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -110,7 +110,7 @@ class Template {
/**
* Load theme's parameters.
*/
- function set_theme($root, $theme, $path, $load_css=true)
+ function set_theme($root, $theme, $path, $load_css=true, $load_local_head=true)
{
$this->set_template_dir($root.'/'.$theme.'/'.$path);
@@ -118,18 +118,20 @@ class Template {
if (isset($themeconf['parent']) and $themeconf['parent'] != $theme)
{
- if (!isset($themeconf['load_parent_css']))
- {
- $themeconf['load_parent_css'] = $load_css;
- }
- $this->set_theme($root, $themeconf['parent'], $path, $themeconf['load_parent_css']);
+ $this->set_theme(
+ $root,
+ $themeconf['parent'],
+ $path,
+ isset($themeconf['load_parent_css']) ? $themeconf['load_parent_css'] : $load_css,
+ isset($themeconf['load_parent_local_head']) ? $themeconf['load_parent_local_head'] : $load_local_head
+ );
}
$tpl_var = array(
'id' => $theme,
'load_css' => $load_css,
);
- if (!empty($themeconf['local_head']) )
+ if (!empty($themeconf['local_head']) and $load_local_head)
{
$tpl_var['local_head'] = realpath($root.'/'.$theme.'/'.$themeconf['local_head'] );
}