mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +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)
|
private function _fetch($filename)
|
||||||
{
|
{
|
||||||
|
// Remember the current template filename.
|
||||||
|
$__current_filename = $this->web_path . $this->filename;
|
||||||
|
|
||||||
// Import Context and lang as local variables.
|
// Import Context and lang as local variables.
|
||||||
$__Context = Context::getAll();
|
$__Context = Context::getAll();
|
||||||
$__Context->tpl_path = $this->path;
|
$__Context->tpl_path = $this->path;
|
||||||
|
|
@ -474,8 +477,8 @@ class TemplateHandler
|
||||||
// Insert template path comment tag.
|
// Insert template path comment tag.
|
||||||
if(Rhymix\Framework\Debug::isEnabledForCurrentUser() && Context::getResponseMethod() === 'HTML' && !starts_with('<!DOCTYPE', $contents) && !starts_with('<?xml', $contents))
|
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";
|
$sign = '<!--#Template%s:' . $__current_filename . '-->' . "\n";
|
||||||
$contents = sprintf($sign, 'start') . $contents . sprintf($sign, 'end');
|
$contents = sprintf($sign, 'Start') . $contents . sprintf($sign, 'End');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $contents;
|
return $contents;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue