diff --git a/change_log.txt b/change_log.txt index be9030b1..ede46283 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,5 +1,8 @@ 11/14/2009 - bugfix on merging compiled templates when source files got removed or renamed. +- bugfix modifiers on registered object tags +- fixed locaion where outputfilters are running +- fixed config file definitions at EOF 11/12/2009 - fixed variable filenames in {include_php} and {insert} diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index ba7dc3f8..7183ee21 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -88,7 +88,7 @@ define('SMARTY_PHP_ALLOW', 3); //-> escape tags as entities * register the class autoloader */ if (!defined('SMARTY_SPL_AUTOLOAD')) { - define('SMARTY_SPL_AUTOLOAD',0); + define('SMARTY_SPL_AUTOLOAD', 0); } if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) { @@ -98,7 +98,7 @@ if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR } } else { spl_autoload_register('smartyAutoload'); -} +} /** * This is the main Smarty class @@ -164,7 +164,7 @@ class Smarty extends Smarty_Internal_TemplateBase { // config var settings public $config_overwrite = true; //Controls whether variables with the same name overwrite each other. public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean - public $config_read_hidden = true; //Controls whether hidden config sections/vars are read from the file. + public $config_read_hidden = true; //Controls whether hidden config sections/vars are read from the file. // config vars public $config_vars = array(); // assigned tpl vars @@ -309,7 +309,11 @@ class Smarty extends Smarty_Internal_TemplateBase { $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting) ? $this->error_reporting : error_reporting() &~E_NOTICE); // return redered template - $_output = $_template->getRenderedTemplate(); + if (isset($this->autoload_filters['output']) || isset($this->registered_filters['output'])) { + $_output = $this->filter_handler->execute('output', $_template->getRenderedTemplate()); + } else { + $_output = $_template->getRenderedTemplate(); + } $_template->rendered_content = null; error_reporting($_smarty_old_error_level); return $_output; diff --git a/libs/sysplugins/smarty_internal_compile_eval.php b/libs/sysplugins/smarty_internal_compile_eval.php index 22960cd0..c94a1aa7 100644 --- a/libs/sysplugins/smarty_internal_compile_eval.php +++ b/libs/sysplugins/smarty_internal_compile_eval.php @@ -35,9 +35,9 @@ class Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase { $_output = "\$_template = new Smarty_Template ('string:'.".$_attr['var'].", \$_smarty_tpl->smarty, \$_smarty_tpl);"; //was there an assign attribute? if (isset($_assign)) { - $_output .= "\$_smarty_tpl->assign($_assign,\$_smarty_tpl->smarty->fetch(\$_template));"; + $_output .= "\$_smarty_tpl->assign($_assign,\$_template->getRenderedTemplate());"; } else { - $_output .= "echo \$_smarty_tpl->smarty->fetch(\$_template);"; + $_output .= "echo \$_template->getRenderedTemplate();"; } return ""; } diff --git a/libs/sysplugins/smarty_internal_compile_function_call.php b/libs/sysplugins/smarty_internal_compile_function_call.php index 31692941..18371f2a 100644 --- a/libs/sysplugins/smarty_internal_compile_function_call.php +++ b/libs/sysplugins/smarty_internal_compile_function_call.php @@ -65,9 +65,9 @@ class Smarty_Internal_Compile_Function_Call extends Smarty_Internal_CompileBase $_output .= "\$_template->compiled_template = \$this->smarty->template_functions['$_name']['compiled'];\n\$_template->mustCompile = false;\n"; // was there an assign attribute if (isset($_assign)) { - $_output .= "\$_smarty_tpl->assign($_assign,\$_smarty_tpl->smarty->fetch(\$_template)); ?>"; + $_output .= "\$_smarty_tpl->assign($_assign,\$_template->getRenderedTemplate()); ?>"; } else { - $_output .= "echo \$_smarty_tpl->smarty->fetch(\$_template); ?>"; + $_output .= "echo \$_template->getRenderedTemplate(); ?>"; } return $_output; } diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 0b1b4e43..cc8ebb0a 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -149,14 +149,14 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { $_output .= "\$_template->caching = $_caching;"; // was there an assign attribute if (isset($_assign)) { - $_output .= "\$_smarty_tpl->assign($_assign,\$_template->fetch()); ?>"; + $_output .= "\$_smarty_tpl->assign($_assign,\$_template->getRenderedTemplate()); ?>"; } else { if ($has_compiled_template) { $_output .= " \$_tpl_stack[] = \$_smarty_tpl; \$_smarty_tpl = \$_template;?>\n"; $_output .= $compiled_tpl . "getTemplateFilepath() . "\" */ ?>"; $_output .= ""; } else { - $_output .= " echo \$_template->fetch(); ?>"; + $_output .= " echo \$_template->getRenderedTemplate(); ?>"; } } if ($_parent_scope != SMARTY_LOCAL_SCOPE) { diff --git a/libs/sysplugins/smarty_internal_configfilelexer.php b/libs/sysplugins/smarty_internal_configfilelexer.php index 05a28a23..57cce5d6 100644 --- a/libs/sysplugins/smarty_internal_configfilelexer.php +++ b/libs/sysplugins/smarty_internal_configfilelexer.php @@ -265,3 +265,4 @@ class Smarty_Internal_Configfilelexer } } +?> diff --git a/libs/sysplugins/smarty_internal_configfileparser.php b/libs/sysplugins/smarty_internal_configfileparser.php index a201f39d..a8c375c4 100644 --- a/libs/sysplugins/smarty_internal_configfileparser.php +++ b/libs/sysplugins/smarty_internal_configfileparser.php @@ -1160,3 +1160,4 @@ static public $yy_action = array( } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0); } } +?> diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 22a9e6ef..7ff703f4 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -517,8 +517,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase { $this->renderTemplate(); } $this->updateParentVariables(); - return (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))? - $this->smarty->filter_handler->execute('output', $this->rendered_content) : $this->rendered_content; + return $this->rendered_content; } /**