diff options
| author | uwe.tews@googlemail.com <uwe.tews@googlemail.com> | 2010-09-17 18:10:10 +0000 |
|---|---|---|
| committer | uwe.tews@googlemail.com <uwe.tews@googlemail.com> | 2010-09-17 18:10:10 +0000 |
| commit | 18bcfa2ba796128a66129c65484d7953eb968131 (patch) | |
| tree | 7845875782d554df0b4b32317bb65ad3987fa509 /libs/sysplugins/smarty_internal_resource_extends.php | |
| parent | 66752cd790ac9ee52e278127f1d0297f2cc4f187 (diff) | |
| download | smarty-18bcfa2ba796128a66129c65484d7953eb968131.tar.gz smarty-18bcfa2ba796128a66129c65484d7953eb968131.tar.bz2 smarty-18bcfa2ba796128a66129c65484d7953eb968131.zip | |
- bugfix {$smarty.template} and {$smarty.current_dir} did not compile correctly within {block} tags
- bugfix corrected error message on missing template files in extends resource
- bugfix untility compileAllTemplates() did not create sha1 code for compiled template file names if template_dir was defined with no trailing DS
Diffstat (limited to 'libs/sysplugins/smarty_internal_resource_extends.php')
| -rw-r--r-- | libs/sysplugins/smarty_internal_resource_extends.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php index 5db8e761..891c950f 100644 --- a/libs/sysplugins/smarty_internal_resource_extends.php +++ b/libs/sysplugins/smarty_internal_resource_extends.php @@ -55,6 +55,9 @@ class Smarty_Internal_Resource_Extends { $_files = explode('|', $_template->resource_name); foreach ($_files as $_file) { $_filepath = $_template->buildTemplateFilepath ($_file); + if ($_filepath === false) { + throw new SmartyException("Unable to load template 'file : {$_file}'"); + } if ($_filepath !== false) { if ($_template->security) { $_template->smarty->security_handler->isTrustedResourceDir($_filepath); @@ -90,9 +93,6 @@ class Smarty_Internal_Resource_Extends { $_files = array_reverse($this->allFilepaths); foreach ($_files as $_filepath) { // read template file - if ($_filepath === false) { - throw new SmartyException("Unable to load template 'file : {$_file}'"); - } if ($_filepath != $_files[0]) { $_template->properties['file_dependency'][sha1($_filepath)] = array($_filepath, filemtime($_filepath)); } |
