mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix incorrect debug comment for outer templates in a deeply nested include tree
This commit is contained in:
parent
7f7e0a099d
commit
fead32337e
1 changed files with 5 additions and 2 deletions
|
|
@ -452,6 +452,9 @@ class TemplateHandler
|
|||
*/
|
||||
private function _fetch($filename)
|
||||
{
|
||||
// Remember the current template filename.
|
||||
$__current_filename = $this->web_path . $this->filename;
|
||||
|
||||
// Import Context and lang as local variables.
|
||||
$__Context = Context::getAll();
|
||||
$__Context->tpl_path = $this->path;
|
||||
|
|
@ -474,8 +477,8 @@ class TemplateHandler
|
|||
// Insert template path comment tag.
|
||||
if(Rhymix\Framework\Debug::isEnabledForCurrentUser() && Context::getResponseMethod() === 'HTML' && !starts_with('<!DOCTYPE', $contents) && !starts_with('<?xml', $contents))
|
||||
{
|
||||
$sign = "\n" . '<!-- Template %s : ' . $this->web_path . $this->filename . ' -->' . "\n";
|
||||
$contents = sprintf($sign, 'start') . $contents . sprintf($sign, 'end');
|
||||
$sign = '<!--#Template%s:' . $__current_filename . '-->' . "\n";
|
||||
$contents = sprintf($sign, 'Start') . $contents . sprintf($sign, 'End');
|
||||
}
|
||||
|
||||
return $contents;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue