From a2ccb9a5c9394d83876fb76a97e2dc0b8557737b Mon Sep 17 00:00:00 2001 From: patdenice Date: Thu, 29 Apr 2010 12:45:27 +0000 Subject: feature 1502: Add $themeconf['load_parent_css'] parameter git-svn-id: http://piwigo.org/svn/trunk@5991 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/template.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/template.class.php b/include/template.class.php index ec813efb3..7a5baf5ef 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -102,7 +102,7 @@ class Template { /** * Load theme's parameters. */ - function set_theme($root, $theme, $path) + function set_theme($root, $theme, $path, $load_css=true) { $this->set_template_dir($root.'/'.$theme.'/'.$path); @@ -110,10 +110,17 @@ class Template { if (isset($themeconf['parent']) and $themeconf['parent'] != $theme) { - $this->set_theme($root, $themeconf['parent'], $path); + if (!isset($themeconf['load_parent_css'])) + { + $themeconf['load_parent_css'] = true; + } + $this->set_theme($root, $themeconf['parent'], $path, $themeconf['load_parent_css']); } - $tpl_var = array('id' => $theme); + $tpl_var = array( + 'id' => $theme, + 'load_css' => $load_css, + ); if (!empty($themeconf['local_head']) ) { $tpl_var['local_head'] = realpath($root.'/'.$theme.'/'.$themeconf['local_head'] ); -- cgit v1.2.3