cvs: smarty / NEWS /libs Smarty_Compiler.class.php
"Monte Ohrt" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmohrt1071171542@cvsserver> |
mohrt Thu Dec 11 14:39:02 2003 EDT
Modified files:
/smarty NEWS
/smarty/libs Smarty_Compiler.class.php
Log:
fix 'is even by' and 'is odd by' logic
Index: smarty/NEWS
diff -u smarty/NEWS:1.414 smarty/NEWS:1.415
--- smarty/NEWS:1.414 Wed Dec 10 11:43:38 2003
+++ smarty/NEWS Thu Dec 11 14:39:01 2003
@@ -1,3 +1,4 @@
+ - fix 'is even by' and 'is odd by' logic (Monte)
- add day_empty, month_empty, year_empty and all_empty attributes to
html_select_date (messju)
- add table of explanation for {if} qualifiers in docs (boots)
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.301 smarty/libs/Smarty_Compiler.class.php:1.302
--- smarty/libs/Smarty_Compiler.class.php:1.301 Mon Dec 8 05:44:21 2003
+++ smarty/libs/Smarty_Compiler.class.php Thu Dec 11 14:39:02 2003
@@ -39,7 +39,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.301 2003/12/08 10:44:21 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.302 2003/12/11 19:39:02 mohrt Exp $ */
/**
* Template compiling class
@@ -1385,7 +1385,7 @@
if (@$tokens[$expr_end] == 'by') {
$expr_end++;
$expr_arg = $tokens[$expr_end++];
- $expr = "!(($is_arg / $expr_arg) % " . $this->_parse_var_props($expr_arg) . ")";
+ $expr = "!(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
} else
$expr = "!($is_arg % 2)";
break;
@@ -1394,7 +1394,7 @@
if (@$tokens[$expr_end] == 'by') {
$expr_end++;
$expr_arg = $tokens[$expr_end++];
- $expr = "(($is_arg / $expr_arg) % ". $this->_parse_var_props($expr_arg) . ")";
+ $expr = "(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
} else
$expr = "($is_arg % 2)";
break;
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php