diff --git a/change_log.txt b/change_log.txt index e653e394..727f3e66 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +06/03/2009 +- fixed repeat at block plugins + 05/25/2009 - fixed problem with caching of compiler plugins diff --git a/libs/sysplugins/internal.compile_block_plugin.php b/libs/sysplugins/internal.compile_block_plugin.php index 51f4ec65..6aaf2efe 100644 --- a/libs/sysplugins/internal.compile_block_plugin.php +++ b/libs/sysplugins/internal.compile_block_plugin.php @@ -41,14 +41,14 @@ class Smarty_Internal_Compile_Block_Plugin extends Smarty_Internal_CompileBase { $this->_open_tag($tag, $_params); // compile code - $output = 'smarty->plugin_handler->' . $tag . '(array(' . $_params . ', null, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl),\'block\');while ($_block_repeat) { ob_start();?>'; + $output = 'smarty->plugin_handler->loadSmartyPlugin(\''.$tag.'\', \'block\'); $_smarty_tpl->smarty->registered_plugins[\'' . $tag . '\'][1](' . $_params . ', null, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl);while ($_block_repeat) { ob_start();?>'; } else { // closing tag of block plugin $_params = $this->_close_tag(substr($tag,0,-5)); // This tag does create output $this->compiler->has_output = true; // compile code - $output = 'smarty->plugin_handler->' . substr($tag,0,-5) . '(array(' . $_params . ', $_block_content, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl),\'block\'); }?>'; + $output = 'smarty->registered_plugins[\'' . substr($tag,0,-5) . '\'][1](' . $_params . ', $_block_content, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl); }?>'; } return $output; } diff --git a/libs/sysplugins/internal.plugin_handler.php b/libs/sysplugins/internal.plugin_handler.php index a53e3863..65dde5d4 100644 --- a/libs/sysplugins/internal.plugin_handler.php +++ b/libs/sysplugins/internal.plugin_handler.php @@ -20,7 +20,7 @@ class Smarty_Internal_Plugin_Handler extends Smarty_Internal_Base { public function __call($name, $args) { if ($this->loadSmartyPlugin($name, $args[1])) { - // call plugin + // call plugin return call_user_func_array($this->smarty->registered_plugins[$name][1], $args[0]); } else { // plugin not found