From 0a5b09601b647cf22d9bd4ab291c58156931a761 Mon Sep 17 00:00:00 2001 From: patdenice Date: Thu, 29 Apr 2010 19:57:48 +0000 Subject: feature 1502: Add $themeconf['load_parent_local_head'] parameter git-svn-id: http://piwigo.org/svn/trunk@6006 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/template.class.php | 16 +++++++++------- 1 file 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'] ); } -- cgit v1.2.3