Index: trunk/core/kernel/parser/template_parser.php
===================================================================
diff -u -N -r6428 -r7391
--- trunk/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 6428)
+++ trunk/core/kernel/parser/template_parser.php (.../template_parser.php) (revision 7391)
@@ -393,6 +393,7 @@
$this->SetParams($params, 0); // 0 to disable params sorting and regexp generation - not needed when processing pre-parsed
ob_start();
if ($pre_parsed['mode'] == 'file') {
+ $this->TemplateName = str_replace(FULL_PATH, '', realpath($pre_parsed['fname']));
include($pre_parsed['fname']);
}
else {
@@ -412,7 +413,9 @@
$this->CompiledBuffer .= '$o = \'\';'."\n";
- $output = $this->NewParse($this->Application->TemplatesCache->GetTemplateBody($name, $silent), $name);
+ $body = $this->Application->TemplatesCache->GetTemplateBody($name, $silent);
+ $this->TemplateName = $name;
+ $output = $this->NewParse($body, $name);
$this->CompiledBuffer .= '?'.'>'."\n";
@@ -636,7 +639,9 @@
else
$BlockParser->SetParams($params);
$this->Application->Parser =& $BlockParser;
- if (!isset($params['name'])) trigger_error('***Error: Block name not passed to ParseBlock', E_USER_ERROR);
+ if (!isset($params['name'])) {
+ trigger_error('***Error: Block name not passed to ParseBlock', E_USER_ERROR);
+ }
$templates_cache =& $this->Application->recallObject('TemplatesCache');
$template_name = $as_template ? $params['name'] : $templates_cache->GetTemplateFileName($params['name']) . '-block:'.$params['name'];