mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
- fixed locaion where outputfilters are running
- fixed config file definitions at EOF
This commit is contained in:
@@ -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}
|
||||
|
@@ -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;
|
||||
|
@@ -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 "<?php $_output ?>";
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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 . "<?php /* End of included template \"" . $tpl->getTemplateFilepath() . "\" */ ?>";
|
||||
$_output .= "<?php \$_smarty_tpl = array_pop(\$_tpl_stack);?>";
|
||||
} else {
|
||||
$_output .= " echo \$_template->fetch(); ?>";
|
||||
$_output .= " echo \$_template->getRenderedTemplate(); ?>";
|
||||
}
|
||||
}
|
||||
if ($_parent_scope != SMARTY_LOCAL_SCOPE) {
|
||||
|
@@ -265,3 +265,4 @@ class Smarty_Internal_Configfilelexer
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@@ -1160,3 +1160,4 @@ static public $yy_action = array(
|
||||
} while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user