feature 1502: Add $themeconf['load_parent_local_head'] parameter

git-svn-id: http://piwigo.org/svn/trunk@6006 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice 2010-04-29 19:57:48 +00:00
commit 0a5b09601b

View file

@ -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'] );
}