This performs a Smarty update [4.3.1] - 2023-03-28

Fixes #227

* Releasenotes
This commit is contained in:
Fraenkiman 2023-05-09 21:58:58 +02:00
parent 779379480d
commit 4e529ee5a5
2 changed files with 7 additions and 6 deletions

View File

@ -167,9 +167,7 @@
</html> </html>
{/capture} {/capture}
<script type="text/javascript"> <script type="text/javascript">
{$id = '__Smarty__'} _smarty_console = window.open("", "console{$targetWindow}", "width=1024,height=600,left={$offset},top={$offset},resizable,scrollbars=yes");
{if $display_mode}{$id = "$offset$template_name"|md5}{/if}
_smarty_console = window.open("", "console{$id}", "width=1024,height=600,left={$offset},top={$offset},resizable,scrollbars=yes");
_smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}"); _smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
_smarty_console.document.close(); _smarty_console.document.close();
</script> </script>

View File

@ -238,9 +238,12 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$_config_vars = $ptr->config_vars; $_config_vars = $ptr->config_vars;
ksort($_config_vars); ksort($_config_vars);
$debugging = $smarty->debugging; $debugging = $smarty->debugging;
$templateName = $obj->source->type . ':' . $obj->source->name;
$displayMode = $debugging === 2 || !$full;
$offset = $this->offset * 50;
$_template = new Smarty_Internal_Template($debObj->debug_tpl, $debObj); $_template = new Smarty_Internal_Template($debObj->debug_tpl, $debObj);
if ($obj->_isTplObj()) { if ($obj->_isTplObj()) {
$_template->assign('template_name', $obj->source->type . ':' . $obj->source->name); $_template->assign('template_name', $templateName);
} }
if ($obj->_objType === 1 || $full) { if ($obj->_objType === 1 || $full) {
$_template->assign('template_data', $this->template_data[ $this->index ]); $_template->assign('template_data', $this->template_data[ $this->index ]);
@ -250,8 +253,8 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$_template->assign('assigned_vars', $_assigned_vars); $_template->assign('assigned_vars', $_assigned_vars);
$_template->assign('config_vars', $_config_vars); $_template->assign('config_vars', $_config_vars);
$_template->assign('execution_time', microtime(true) - $smarty->start_time); $_template->assign('execution_time', microtime(true) - $smarty->start_time);
$_template->assign('display_mode', $debugging === 2 || !$full); $_template->assign('targetWindow', $displayMode ? md5("$offset$templateName") : '__Smarty__');
$_template->assign('offset', $this->offset * 50); $_template->assign('offset', $offset);
echo $_template->fetch(); echo $_template->fetch();
if (isset($full)) { if (isset($full)) {
$this->index--; $this->index--;