From 4e529ee5a5072627d5acf7ee950f95a6ac455f66 Mon Sep 17 00:00:00 2001 From: Fraenkiman Date: Tue, 9 May 2023 21:58:58 +0200 Subject: [PATCH] This performs a Smarty update [4.3.1] - 2023-03-28 Fixes #227 * Releasenotes --- fp-includes/smarty-4.3.1/libs/debug.tpl | 4 +--- .../libs/sysplugins/smarty_internal_debug.php | 9 ++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fp-includes/smarty-4.3.1/libs/debug.tpl b/fp-includes/smarty-4.3.1/libs/debug.tpl index 4f82a58..cd93256 100644 --- a/fp-includes/smarty-4.3.1/libs/debug.tpl +++ b/fp-includes/smarty-4.3.1/libs/debug.tpl @@ -167,9 +167,7 @@ {/capture} diff --git a/fp-includes/smarty-4.3.1/libs/sysplugins/smarty_internal_debug.php b/fp-includes/smarty-4.3.1/libs/sysplugins/smarty_internal_debug.php index 570819d..da67904 100644 --- a/fp-includes/smarty-4.3.1/libs/sysplugins/smarty_internal_debug.php +++ b/fp-includes/smarty-4.3.1/libs/sysplugins/smarty_internal_debug.php @@ -238,9 +238,12 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data $_config_vars = $ptr->config_vars; ksort($_config_vars); $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); if ($obj->_isTplObj()) { - $_template->assign('template_name', $obj->source->type . ':' . $obj->source->name); + $_template->assign('template_name', $templateName); } if ($obj->_objType === 1 || $full) { $_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('config_vars', $_config_vars); $_template->assign('execution_time', microtime(true) - $smarty->start_time); - $_template->assign('display_mode', $debugging === 2 || !$full); - $_template->assign('offset', $this->offset * 50); + $_template->assign('targetWindow', $displayMode ? md5("$offset$templateName") : '__Smarty__'); + $_template->assign('offset', $offset); echo $_template->fetch(); if (isset($full)) { $this->index--;