From 402e3f4272264579d8ae840886968067d9869b94 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Sat, 17 Oct 2009 03:36:47 +0000 Subject: [PATCH] - remove ?>\n\nappend($append, ob_get_contents());"; } - $_output .= " \$_smarty_tpl->smarty->_smarty_vars['capture'][$buffer]=ob_get_clean(); ?>\n"; + $_output .= " \$_smarty_tpl->smarty->_smarty_vars['capture'][$buffer]=ob_get_clean(); ?>"; return $_output; } } diff --git a/libs/sysplugins/internal.compile_debug.php b/libs/sysplugins/internal.compile_debug.php index ebf50362..737d6216 100644 --- a/libs/sysplugins/internal.compile_debug.php +++ b/libs/sysplugins/internal.compile_debug.php @@ -26,8 +26,8 @@ class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase { $_attr = $this->_get_attributes($args); // display debug template - $_output = "\$_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl->smarty);"; - return ""; + $_output = "smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl->smarty); ?>"; + return $_output; } } diff --git a/libs/sysplugins/internal.compile_if.php b/libs/sysplugins/internal.compile_if.php index de7285e7..248396fc 100644 --- a/libs/sysplugins/internal.compile_if.php +++ b/libs/sysplugins/internal.compile_if.php @@ -29,7 +29,7 @@ class Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase { $this->_open_tag('if'); if (is_array($args['if condition'])) { $_output = " tpl_vars[".$args['if condition']['var']."])) \$_smarty_tpl->tpl_vars[".$args['if condition']['var']."] = new Smarty_Variable;\n"; - $_output .= " if (\$_smarty_tpl->tpl_vars[".$args['if condition']['var']."]->value = ".$args['if condition']['value']."): ?>"; + $_output .= "if (\$_smarty_tpl->tpl_vars[".$args['if condition']['var']."]->value = ".$args['if condition']['value']."): ?>"; return $_output; } else { return ''; diff --git a/libs/sysplugins/internal.compile_include.php b/libs/sysplugins/internal.compile_include.php index af3f3dcb..586c2c92 100644 --- a/libs/sysplugins/internal.compile_include.php +++ b/libs/sysplugins/internal.compile_include.php @@ -138,7 +138,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { } else { if ($has_compiled_template) { $_output .= " \$_tpl_stack[] = \$_smarty_tpl; \$_smarty_tpl = \$_template;?>\n"; - $_output .= $compiled_tpl . "getTemplateFilepath() . "\" */ ?>";; + $_output .= $compiled_tpl . "getTemplateFilepath() . "\" */ ?>"; $_output .= ""; } else { $_output .= " echo \$_template->fetch(); ?>"; diff --git a/libs/sysplugins/internal.smartytemplatecompiler.php b/libs/sysplugins/internal.smartytemplatecompiler.php index ebb44ded..c7ab159d 100644 --- a/libs/sysplugins/internal.smartytemplatecompiler.php +++ b/libs/sysplugins/internal.smartytemplatecompiler.php @@ -63,7 +63,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom if (!$this->compile_error) { // return compiled code - return $parser->retvalue; + return str_replace(array("?>\nretvalue); } else { // compilation error return false;