Beispiel #1
0
 function _extraFiltersForTemplates($templateID, $active)
 {
     // If the template code is invalid (template doesn't exist?), quit
     $allTemplates =& $this->getTemplates();
     if (!isset($allTemplates[$templateID])) {
         return;
     }
     $tempPath = str_replace(JPATH_SITE . DS, '', $allTemplates[$templateID]['basedir']) . DS . $allTemplates[$templateID]['template'];
     // Use the DEF to apply inclusion/exclusion of template directory
     jpimport('models.def', true);
     $defModel = new JoomlapackModelDef();
     if ($active) {
         $defModel->enableFilter($tempPath);
     } else {
         $defModel->disableFilter($tempPath);
     }
 }