mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 18:04:26 +02:00
- bugfix/enhancement {capture} allow variable as capture block name in Smarty special variable
like $smarty.capture.$foo https://github.com/smarty-php/smarty/issues/478 https://github.com/smarty-php/smarty/pull/481
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
===== 3.1.33-dev-6 =====
|
||||
===== 3.1.33-dev-7 =====
|
||||
26.08.2018
|
||||
- bugfix/enhancement {capture} allow variable as capture block name in Smarty special variable
|
||||
like $smarty.capture.$foo https://github.com/smarty-php/smarty/issues/478 https://github.com/smarty-php/smarty/pull/481
|
||||
|
||||
===== 3.1.33-dev-6 =====
|
||||
19.08.2018
|
||||
- fix PSR-2 coding standards and PHPDoc blocks https://github.com/smarty-php/smarty/pull/452
|
||||
https://github.com/smarty-php/smarty/pull/475
|
||||
|
@@ -112,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.33-dev-6';
|
||||
const SMARTY_VERSION = '3.1.33-dev-7';
|
||||
/**
|
||||
* define variable scopes
|
||||
*/
|
||||
|
@@ -43,12 +43,7 @@ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase
|
||||
*/
|
||||
public static function compileSpecialVariable($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter = null)
|
||||
{
|
||||
$tag = trim($parameter[ 0 ], '"\'');
|
||||
$name = isset($parameter[ 1 ]) ? $compiler->getId($parameter[ 1 ]) : null;
|
||||
if (!$name) {
|
||||
//$compiler->trigger_template_error("missing or illegal \$smarty.{$tag} name attribute", null, true);
|
||||
}
|
||||
return '$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl'.(isset($name)?", '{$name}')":')');
|
||||
return '$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl'.(isset($parameter[ 1 ])?", {$parameter[ 1 ]})":')');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user