mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
- enabled short boolean attributes {some attr} equala {some attr=true}
This commit is contained in:
@@ -23,7 +23,7 @@ class Smarty_Internal_Compile_Print_Expression extends Smarty_Internal_CompileBa
|
|||||||
{
|
{
|
||||||
$this->compiler = $compiler;
|
$this->compiler = $compiler;
|
||||||
$this->required_attributes = array('value');
|
$this->required_attributes = array('value');
|
||||||
$this->optional_attributes = array('assign', 'nocache', 'filter');
|
$this->optional_attributes = array('assign', 'nocache', 'filter', 'nofilter');
|
||||||
// check and get attributes
|
// check and get attributes
|
||||||
$_attr = $this->_get_attributes($args);
|
$_attr = $this->_get_attributes($args);
|
||||||
|
|
||||||
@@ -36,6 +36,11 @@ class Smarty_Internal_Compile_Print_Expression extends Smarty_Internal_CompileBa
|
|||||||
if (!isset($_attr['filter'])) {
|
if (!isset($_attr['filter'])) {
|
||||||
$_attr['filter'] = 'null';
|
$_attr['filter'] = 'null';
|
||||||
}
|
}
|
||||||
|
if (isset($_attr['nofilter'])) {
|
||||||
|
if ($_attr['nofilter'] == 'true') {
|
||||||
|
$_attr['filter'] = 'false';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_attr['assign'])) {
|
if (isset($_attr['assign'])) {
|
||||||
// assign output to variable
|
// assign output to variable
|
||||||
|
@@ -2088,7 +2088,7 @@ static public $yy_action = array(
|
|||||||
function yy_r30(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }
|
function yy_r30(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }
|
||||||
#line 2094 "internal.templateparser.php"
|
#line 2094 "internal.templateparser.php"
|
||||||
#line 205 "internal.templateparser.y"
|
#line 205 "internal.templateparser.y"
|
||||||
function yy_r31(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor=>null); }
|
function yy_r31(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor=>'true'); }
|
||||||
#line 2097 "internal.templateparser.php"
|
#line 2097 "internal.templateparser.php"
|
||||||
#line 210 "internal.templateparser.y"
|
#line 210 "internal.templateparser.y"
|
||||||
function yy_r32(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
|
function yy_r32(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
|
||||||
|
Reference in New Issue
Block a user