mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- fix compiled code for new {block} assign attribute
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
- rework of template inheritance
|
- rework of template inheritance
|
||||||
- speed and size optimizations
|
- speed and size optimizations
|
||||||
- bugfix under HHVM temporary cache file must only be created when caches template was updated
|
- bugfix under HHVM temporary cache file must only be created when caches template was updated
|
||||||
|
- fix compiled code for new {block} assign attribute
|
||||||
|
|
||||||
18.09.2015
|
18.09.2015
|
||||||
- bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92
|
- bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92
|
||||||
|
@@ -119,7 +119,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.28-dev/64';
|
const SMARTY_VERSION = '3.1.28-dev/65';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
|
@@ -201,7 +201,7 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
|
|||||||
$compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
|
$compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
|
||||||
$output = "<?php\n";
|
$output = "<?php\n";
|
||||||
if (isset($_assign)) {
|
if (isset($_assign)) {
|
||||||
$output .= "\$_smarty_tpl->tpl_vars[{$_assign}] = new Smarty_Variable(ob_get_contents());\n";
|
$output .= "\$_smarty_tpl->tpl_vars[{$_assign}] = new Smarty_Variable(ob_get_clean());\n";
|
||||||
}
|
}
|
||||||
$output .= "/*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n";
|
$output .= "/*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n";
|
||||||
$output .= "}\n";
|
$output .= "}\n";
|
||||||
@@ -232,7 +232,7 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
|
|||||||
$compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
|
$compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
|
||||||
$output = "<?php\n";
|
$output = "<?php\n";
|
||||||
if (isset($_assign)) {
|
if (isset($_assign)) {
|
||||||
$output .= "\$_smarty_tpl->tpl_vars[{$_assign}] = new Smarty_Variable(ob_get_contents());\n";
|
$output .= "\$_smarty_tpl->tpl_vars[{$_assign}] = new Smarty_Variable(ob_get_clean());\n";
|
||||||
}
|
}
|
||||||
$output .= "}\n";
|
$output .= "}\n";
|
||||||
$output .= "/* {/block '{$_name}'} */\n\n";
|
$output .= "/* {/block '{$_name}'} */\n\n";
|
||||||
|
Reference in New Issue
Block a user