From a693a00280fa8dd333706091c10a9eef611a6d3f Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Sun, 9 Aug 2009 22:03:33 +0000 Subject: [PATCH] - fixed problems with doublequoted strings at name attribute of {block} tag - bugfix at scope attribute of {append} tag --- change_log.txt | 4 ++++ libs/sysplugins/internal.compile_append.php | 8 +++++++- libs/sysplugins/internal.compile_blockclose.php | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 37602eb5..d0838dde 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,7 @@ +08/09/2009 +- fixed problems with doublequoted strings at name attribute of {block} tag +- bugfix at scope attribute of {append} tag + 08/08/2009 - removed all internal calls of Smarty::instance() - fixed code in double quoted strings diff --git a/libs/sysplugins/internal.compile_append.php b/libs/sysplugins/internal.compile_append.php index 495efac2..d60d8089 100644 --- a/libs/sysplugins/internal.compile_append.php +++ b/libs/sysplugins/internal.compile_append.php @@ -41,7 +41,13 @@ class Smarty_Internal_Compile_Append extends Smarty_Internal_CompileBase { $_attr = $this->_get_attributes($args); if (isset($_attr['scope'])) { - $_scope = trim($_attr['scope'],'\''); + if ($_attr['scope'] == '\'parent\'') { + $_scope = SMARTY_PARENT_SCOPE; + } elseif ($_attr['scope'] == '\'root\'') { + $_scope = SMARTY_ROOT_SCOPE; + } elseif ($_attr['scope'] == '\'global\'') { + $_scope = SMARTY_GLOBAL_SCOPE; + } } // compiled output if (isset($_attr['index'])) { diff --git a/libs/sysplugins/internal.compile_blockclose.php b/libs/sysplugins/internal.compile_blockclose.php index 36f21e7d..b4a768df 100644 --- a/libs/sysplugins/internal.compile_blockclose.php +++ b/libs/sysplugins/internal.compile_blockclose.php @@ -33,7 +33,7 @@ class Smarty_Internal_Compile_BlockClose extends Smarty_Internal_CompileBase { if (isset($_attr['name']) && $saved_data[0]['name'] != $_attr['name']) { $this->compiler->trigger_template_error('mismatching name attributes "' . $saved_data[0]['name'] . '" and "' . $_attr['name'] . '"'); } - $_name = trim($saved_data[0]['name'], "'"); + $_name = trim($saved_data[0]['name'], "\"'"); if (isset($compiler->template->block_data[$_name])) { if ($compiler->template->block_data[$_name]['mode'] == 'prepend') { $_output = $compiler->template->block_data[$_name]['compiled'] . $compiler->template->extracted_compiled_code;