mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
- bugfix if condition string 'neq' broken due to a typo https://github.com/smarty-php/smarty/issues/42
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
===== 3.1.25-dev===== (xx.xx.2015)
|
===== 3.1.25-dev===== (xx.xx.2015)
|
||||||
|
24.05.2015
|
||||||
|
- bugfix if condition string 'neq' broken due to a typo https://github.com/smarty-php/smarty/issues/42
|
||||||
|
|
||||||
===== 3.1.24===== (23.05.2015)
|
===== 3.1.24===== (23.05.2015)
|
||||||
23.05.2015
|
23.05.2015
|
||||||
|
@@ -293,7 +293,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
literal = ~literal~
|
literal = ~literal~
|
||||||
strip = ~strip~
|
strip = ~strip~
|
||||||
lop = ~\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\s*~
|
lop = ~\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\s*~
|
||||||
tlop = ~\s+(eq|ne|neg|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\s+(not\s+)?(odd|even|div)\s+by))\s+~
|
tlop = ~\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\s+(not\s+)?(odd|even|div)\s+by))\s+~
|
||||||
scond = ~\s+is\s+(not\s+)?(odd|even)~
|
scond = ~\s+is\s+(not\s+)?(odd|even)~
|
||||||
isin = ~\s+is\s+in\s+~
|
isin = ~\s+is\s+in\s+~
|
||||||
as = ~\s+as\s+~
|
as = ~\s+as\s+~
|
||||||
|
@@ -1237,7 +1237,7 @@ lop(res) ::= TLOGOP(o). {
|
|||||||
'isoddby' => array('op' => ' / ', 'pre' => '(1 & '),
|
'isoddby' => array('op' => ' / ', 'pre' => '(1 & '),
|
||||||
'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),
|
'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),
|
||||||
);
|
);
|
||||||
$op = strtolower(str_replace(' ', '', o));
|
$op = strtolower(preg_replace('/\s*/', '', o));
|
||||||
res = $lops[$op];
|
res = $lops[$op];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.25-dev/0';
|
const SMARTY_VERSION = '3.1.25-dev/1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
|
@@ -504,7 +504,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
public function yylex3()
|
public function yylex3()
|
||||||
{
|
{
|
||||||
if (!isset($this->yy_global_pattern3)) {
|
if (!isset($this->yy_global_pattern3)) {
|
||||||
$this->yy_global_pattern3 = "/\G(\\s*" . $this->rdel . ")|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$]smarty\\.block\\.(child|parent))|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\\s*)|\G(\\s+(eq|ne|neg|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\\s+(not\\s+)?(odd|even|div)\\s+by))\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G(([!]\\s*)|(not\\s+))|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|])|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G(" . $this->ldel . "\\s*)|\G([\S\s])/isS";
|
$this->yy_global_pattern3 = "/\G(\\s*" . $this->rdel . ")|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$]smarty\\.block\\.(child|parent))|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\\s+(not\\s+)?(odd|even|div)\\s+by))\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G(([!]\\s*)|(not\\s+))|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|])|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G(" . $this->ldel . "\\s*)|\G([\S\s])/isS";
|
||||||
}
|
}
|
||||||
if ($this->counter >= strlen($this->data)) {
|
if ($this->counter >= strlen($this->data)) {
|
||||||
return false; // end of input
|
return false; // end of input
|
||||||
|
@@ -2202,7 +2202,7 @@ class Smarty_Internal_Templateparser
|
|||||||
'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
|
'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
|
||||||
'isoddby' => array('op' => ' / ', 'pre' => '(1 & '),
|
'isoddby' => array('op' => ' / ', 'pre' => '(1 & '),
|
||||||
'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),);
|
'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),);
|
||||||
$op = strtolower(str_replace(' ', '', $this->yystack[$this->yyidx + 0]->minor));
|
$op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor));
|
||||||
$this->_retvalue = $lops[$op];
|
$this->_retvalue = $lops[$op];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user