Changeset 1848 in ExiteCMS
- Timestamp:
- 10/14/08 15:32:59 (3 years ago)
- File:
-
- 1 edited
-
trunk/includes/theme_functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/theme_functions.php
r1802 r1848 255 255 } 256 256 257 // store the current template directories, we need to restore them later 258 $td = $template->template_dir; 259 257 260 //if this is a module template... 258 261 $tpl_parts = explode(".", $panel['template']); 259 262 if ($tpl_parts[0] == "modules") { 260 // store the current template directories, we need to restore them later261 $td = $template->template_dir;262 263 $template->template_dir = array_merge(array(PATH_MODULES.$tpl_parts[1].'/templates'), $template->template_dir); 263 } else {264 // we shouldn't get here265 264 } 266 265 … … 268 267 $tpl_parts = explode(".", $panel['template']); 269 268 if ($tpl_parts[0] == "admin" && $tpl_parts[1] == "tools") { 270 // store the current template directories, we need to restore them later271 $td = $template->template_dir;272 269 $template->template_dir = array_merge(array(PATH_ADMIN.'tools/templates'), $template->template_dir); 273 } else {274 // we shouldn't get here275 270 } 276 271 277 272 // if a template is defined, get the last modified date, and load the template 278 273 if (isset($panel['template'])) { 274 // add the theme template directory as first template directory 275 $template->template_dir = array_merge(array(PATH_THEME.'templates/templates'), $template->template_dir); 279 276 // get the timestamp of the template, and update the last update timestamp if newer 280 277 $ts = $template->template_timestamp($panel['template']); … … 285 282 } 286 283 287 // restore the template direcory if needed288 if (isset($td) && is_array($td))$template->template_dir = $td;284 // restore the template direcory 285 $template->template_dir = $td; 289 286 } 290 287 }
Note: See TracChangeset
for help on using the changeset viewer.
