Dotclear

Changeset 2862:53cb018029a4


Ignore:
Timestamp:
12/20/14 00:04:20 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.7
Message:

Cope with default-template/<tplset> directories of plugins, fixes #2024

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/themeEditor/class.themeEditor.php

    r2663 r2862  
    2020     protected $tplset_theme; 
    2121 
     22     protected $tplset_name; 
     23 
    2224     public $tpl = array(); 
    2325     public $css = array(); 
     
    3133          $this->user_theme = path::real($this->core->blog->themes_path.'/'.$this->core->blog->settings->system->theme); 
    3234          $this->tplset_theme = DC_ROOT.'/inc/public/default-templates/'.DC_DEFAULT_TPLSET; 
     35          $this->tplset_name = DC_DEFAULT_TPLSET; 
    3336          if (null !== $this->core->themes) { 
    3437               $parent_theme = $this->core->themes->moduleInfo($this->core->blog->settings->system->theme,'parent'); 
     
    3942               if ($tplset) { 
    4043                    $this->tplset_theme = DC_ROOT.'/inc/public/default-templates/'.$tplset; 
     44                    $this->tplset_name = $tplset; 
    4145               } 
    4246          } 
     
    295299          $plugins = $this->core->plugins->getModules(); 
    296300          foreach ($plugins as $p) { 
     301               // Looking in default-templates directory 
    297302               $this->tpl = array_merge($this->getFilesInDir($p['root'].'/default-templates'),$this->tpl); 
    298303               $this->tpl_model = array_merge($this->getFilesInDir($p['root'].'/default-templates'),$this->tpl_model); 
     304               // Looking in default-templates/tplset directory 
     305               $this->tpl = array_merge($this->getFilesInDir($p['root'].'/default-templates/'.$this->tplset_name),$this->tpl); 
     306               $this->tpl_model = array_merge($this->getFilesInDir($p['root'].'/default-templates/'.$this->tplset_name),$this->tpl_model); 
    299307          } 
    300308 
Note: See TracChangeset for help on using the changeset viewer.

Sites map