fix bug with decimal numbers in if statements, misc doc updates

This commit is contained in:
mohrt
2003-02-12 22:13:18 +00:00
parent 7ea528362e
commit 77fa84916e
4 changed files with 21 additions and 15 deletions

2
NEWS
View File

@@ -22,7 +22,7 @@ Version 2.4.0 (Feb 2, 2003)
---------------------------
- 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 debug template to secure_dir, add template_dir
to secure_dir by default (Ferdinand Beyer, Monte)

View File

@@ -1097,7 +1097,7 @@ class Smarty_Compiler extends Smarty {
preg_match_all('/(?>
' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*) | # valid object call
' . $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
\S+ # anything else
)/x', $tag_args, $match);

View File

@@ -1462,10 +1462,9 @@ s.</programlisting>
<chapter id="language.combining.modifiers">
<title>Combining Modifiers</title>
<para>
You can apply as many modifiers as you like to a variable. The modifiers
will be applied to the variable in the order they are combined, from left
to right. The modifier have to be separated with a <literal>|</literal>
(pipe) symbol.
You can apply any number of modifiers to a variable. They will be
applied in the order they are combined, from left to right. They must
be separated with a <literal>|</literal> (pipe) character.
</para>
<example>
<title>combining modifiers</title>
@@ -3107,17 +3106,24 @@ OUTPUT:
<example>
<title>cycle</title>
<programlisting>
{* initialize the values *}
{cycle values="#eeeeee,#d0d0d0"}
{cycle}
{cycle}
{section name=rows loop=$data}
&lt;tr bgcolor="{cycle values="#eeeeee,#d0d0d0"}"&gt;
&lt;td&gt;{$data[rows]}&lt;/td&gt;
&lt;/tr&gt;
{/section}
OUTPUT:
#eeeeee
#d0d0d0
#eeeeee</programlisting>
&lt;tr bgcolor="#eeeeee"&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor="#d0d0d0"&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor="#eeeeee"&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
</programlisting>
</example>
</sect1>
<sect1 id="language.function.debug">

View File

@@ -1097,7 +1097,7 @@ class Smarty_Compiler extends Smarty {
preg_match_all('/(?>
' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*) | # valid object call
' . $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
\S+ # anything else
)/x', $tag_args, $match);