Index: trunk/core/kernel/parser/template.php =================================================================== diff -u -N -r4758 -r4971 --- trunk/core/kernel/parser/template.php (.../template.php) (revision 4758) +++ trunk/core/kernel/parser/template.php (.../template.php) (revision 4971) @@ -75,38 +75,14 @@ var $BasePath; var $FileNames = Array(); - var $ModulesCache = Array(); - function TemplatesCache() { parent::kBase(); - $this->SetThemePath(); $this->BasePath = FULL_PATH.THEMES_PATH; $conn =& $this->Application->GetADODBConnection(); -// $this->ModulesCache = $conn->GetCol('SELECT LOWER(Name) FROM '.TABLE_PREFIX.'Modules'); } - function SetThemePath() - { - if (defined('SPECIAL_TEMPLATES_FOLDER')) { - $sub_folder = SPECIAL_TEMPLATES_FOLDER; - } - elseif ($this->Application->IsAdmin()) { - $sub_folder = '/admin/templates'; - } - else { - $theme =& $this->Application->recallObject('theme.current'); - if ($theme->isLoaded()) { - $sub_folder = '/themes/'.$theme->GetDBField('Name'); - } - else { - die('No Primary Theme Selected'); - } - } - safeDefine('THEMES_PATH', $sub_folder); - } - function LoadTemplate($filename, $title=NULL, $silent=0) { if (preg_match('#^[\/]{0,1}([^\/]*)\/(.*)#', $filename, $regs)) { @@ -118,7 +94,7 @@ $module_filename = $filename; } - if ( $this->Application->IsAdmin() && $this->Application->findModule('Name', $first_dir, null, true)) { + if ( $this->Application->IsAdmin() && $this->Application->findModule('Name', $first_dir)) { $path = MODULES_PATH.'/'.strtolower($first_dir).'/admin_templates'; } else { @@ -141,7 +117,7 @@ $module_filename = $filename; } - if ( $this->Application->IsAdmin() && $this->Application->findModule('Name', $first_dir, null, true)) { + if ( $this->Application->IsAdmin() && $this->Application->findModule('Name', $first_dir)) { $path = MODULES_PATH.'/'.strtolower($first_dir).'/admin_templates'; } else {