From 856f77e6462685d652cea1cb58bb1c28a21f41ee Mon Sep 17 00:00:00 2001 From: mohrt Date: Sat, 3 Mar 2001 15:41:52 +0000 Subject: [PATCH] fixed bug with cached insert tags --- Smarty.class.php | 3 +++ Smarty_Compiler.class.php | 2 -- libs/Smarty.class.php | 3 +++ libs/Smarty_Compiler.class.php | 2 -- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Smarty.class.php b/Smarty.class.php index fc323dbe..0dafdb23 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -105,6 +105,7 @@ class Smarty // internal vars var $_error_msg = false; // error messages. true/false var $_tpl_vars = array(); + var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f'; // md5 checksum of the string 'Smarty' /*======================================================================*\ Function: Smarty @@ -417,7 +418,9 @@ class Smarty list($cached_inserts, $insert_args) = $match; for ($i = 0; $i < count($cached_inserts); $i++) { + $args = unserialize($insert_args[$i]); + $name = $args['name']; unset($args['name']); diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index 02065f75..eba013f7 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -7,7 +7,6 @@ class Smarty_Compiler extends Smarty { var $_literal_blocks = array(); // keeps literal template blocks var $_current_file = null; // the current template being compiled var $_current_line_no = 1; // line number for error messages - var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f'; // md5 checksum of the string 'Smarty' /*======================================================================*\ Function: _traverse_files() @@ -210,7 +209,6 @@ class Smarty_Compiler extends Smarty { return $results; } - /*======================================================================*\ Function: _compile_tag Purpose: Compile a template tag diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index fc323dbe..0dafdb23 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -105,6 +105,7 @@ class Smarty // internal vars var $_error_msg = false; // error messages. true/false var $_tpl_vars = array(); + var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f'; // md5 checksum of the string 'Smarty' /*======================================================================*\ Function: Smarty @@ -417,7 +418,9 @@ class Smarty list($cached_inserts, $insert_args) = $match; for ($i = 0; $i < count($cached_inserts); $i++) { + $args = unserialize($insert_args[$i]); + $name = $args['name']; unset($args['name']); diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 02065f75..eba013f7 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -7,7 +7,6 @@ class Smarty_Compiler extends Smarty { var $_literal_blocks = array(); // keeps literal template blocks var $_current_file = null; // the current template being compiled var $_current_line_no = 1; // line number for error messages - var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f'; // md5 checksum of the string 'Smarty' /*======================================================================*\ Function: _traverse_files() @@ -210,7 +209,6 @@ class Smarty_Compiler extends Smarty { return $results; } - /*======================================================================*\ Function: _compile_tag Purpose: Compile a template tag