Ignore:
Timestamp:
Apr 29, 2010, 9:57:48 PM (14 years ago)
Author:
patdenice
Message:

feature 1502: Add $themeconfload_parent_local_head parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/template.class.php

    r5999 r6006  
    111111   * Load theme's parameters.
    112112   */
    113   function set_theme($root, $theme, $path, $load_css=true)
     113  function set_theme($root, $theme, $path, $load_css=true, $load_local_head=true)
    114114  {
    115115    $this->set_template_dir($root.'/'.$theme.'/'.$path);
     
    119119    if (isset($themeconf['parent']) and $themeconf['parent'] != $theme)
    120120    {
    121       if (!isset($themeconf['load_parent_css']))
    122       {
    123         $themeconf['load_parent_css'] = $load_css;
    124       }
    125       $this->set_theme($root, $themeconf['parent'], $path, $themeconf['load_parent_css']);
     121      $this->set_theme(
     122        $root,
     123        $themeconf['parent'],
     124        $path,
     125        isset($themeconf['load_parent_css']) ? $themeconf['load_parent_css'] : $load_css,
     126        isset($themeconf['load_parent_local_head']) ? $themeconf['load_parent_local_head'] : $load_local_head
     127      );
    126128    }
    127129
     
    130132      'load_css' => $load_css,
    131133    );
    132     if (!empty($themeconf['local_head']) )
     134    if (!empty($themeconf['local_head']) and $load_local_head)
    133135    {
    134136      $tpl_var['local_head'] = realpath($root.'/'.$theme.'/'.$themeconf['local_head'] );
Note: See TracChangeset for help on using the changeset viewer.