mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
fix bug with decimal numbers in if statements, misc doc updates
This commit is contained in:
2
NEWS
2
NEWS
@@ -22,7 +22,7 @@ Version 2.4.0 (Feb 2, 2003)
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
- fix known problems with php tag handling in templates
|
- fix known problems with php tag handling in templates
|
||||||
(recursion, echoing <?xml tags) (Monte)
|
(recursion, echoing xml tags) (Monte)
|
||||||
- add support for object registration (Monte)
|
- add support for object registration (Monte)
|
||||||
- add debug template to secure_dir, add template_dir
|
- add debug template to secure_dir, add template_dir
|
||||||
to secure_dir by default (Ferdinand Beyer, Monte)
|
to secure_dir by default (Ferdinand Beyer, Monte)
|
||||||
|
@@ -1097,7 +1097,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
preg_match_all('/(?>
|
preg_match_all('/(?>
|
||||||
' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*) | # valid object call
|
' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*) | # valid object call
|
||||||
' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*) | # var or quoted string
|
' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*) | # var or quoted string
|
||||||
\-?\d+|!==|<=>|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|<|>|\||\%|\+|\-|\/|\* | # valid non-word token
|
\-?\d+(?:\.\d+)?|!==|<=>|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|<|>|\||\%|\+|\-|\/|\* | # valid non-word token
|
||||||
\b\w+\b | # valid word token
|
\b\w+\b | # valid word token
|
||||||
\S+ # anything else
|
\S+ # anything else
|
||||||
)/x', $tag_args, $match);
|
)/x', $tag_args, $match);
|
||||||
|
@@ -1462,10 +1462,9 @@ s.</programlisting>
|
|||||||
<chapter id="language.combining.modifiers">
|
<chapter id="language.combining.modifiers">
|
||||||
<title>Combining Modifiers</title>
|
<title>Combining Modifiers</title>
|
||||||
<para>
|
<para>
|
||||||
You can apply as many modifiers as you like to a variable. The modifiers
|
You can apply any number of modifiers to a variable. They will be
|
||||||
will be applied to the variable in the order they are combined, from left
|
applied in the order they are combined, from left to right. They must
|
||||||
to right. The modifier have to be separated with a <literal>|</literal>
|
be separated with a <literal>|</literal> (pipe) character.
|
||||||
(pipe) symbol.
|
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>combining modifiers</title>
|
<title>combining modifiers</title>
|
||||||
@@ -3107,17 +3106,24 @@ OUTPUT:
|
|||||||
<example>
|
<example>
|
||||||
<title>cycle</title>
|
<title>cycle</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{* initialize the values *}
|
{section name=rows loop=$data}
|
||||||
{cycle values="#eeeeee,#d0d0d0"}
|
<tr bgcolor="{cycle values="#eeeeee,#d0d0d0"}">
|
||||||
{cycle}
|
<td>{$data[rows]}</td>
|
||||||
{cycle}
|
</tr>
|
||||||
|
{/section}
|
||||||
|
|
||||||
OUTPUT:
|
OUTPUT:
|
||||||
|
|
||||||
#eeeeee
|
<tr bgcolor="#eeeeee">
|
||||||
#d0d0d0
|
<td>1</td>
|
||||||
#eeeeee</programlisting>
|
</tr>
|
||||||
|
<tr bgcolor="#d0d0d0">
|
||||||
|
<td>2</td>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="#eeeeee">
|
||||||
|
<td>3</td>
|
||||||
|
</tr>
|
||||||
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1 id="language.function.debug">
|
<sect1 id="language.function.debug">
|
||||||
|
@@ -1097,7 +1097,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
preg_match_all('/(?>
|
preg_match_all('/(?>
|
||||||
' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*) | # valid object call
|
' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*) | # valid object call
|
||||||
' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*) | # var or quoted string
|
' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*) | # var or quoted string
|
||||||
\-?\d+|!==|<=>|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|<|>|\||\%|\+|\-|\/|\* | # valid non-word token
|
\-?\d+(?:\.\d+)?|!==|<=>|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|<|>|\||\%|\+|\-|\/|\* | # valid non-word token
|
||||||
\b\w+\b | # valid word token
|
\b\w+\b | # valid word token
|
||||||
\S+ # anything else
|
\S+ # anything else
|
||||||
)/x', $tag_args, $match);
|
)/x', $tag_args, $match);
|
||||||
|
Reference in New Issue
Block a user