cvs: smarty / NEWS /libs Smarty_Compiler.class.php
| From: | Messju Mohr | Date: | Thu, 03 Apr 2003 17:00:18 +0000 |
| Subject: | cvs: smarty / NEWS /libs Smarty_Compiler.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-508@lists.php.net to get a copy of this message | ||
messju Thu Apr 3 12:00:18 2003 EDT
Modified files:
/smarty NEWS
/smarty/libs Smarty_Compiler.class.php
Log:
name=123 is passed as an integer (not a string) to plugins now
Index: smarty/NEWS
diff -u smarty/NEWS:1.330 smarty/NEWS:1.331
--- smarty/NEWS:1.330 Thu Mar 27 17:10:00 2003
+++ smarty/NEWS Thu Apr 3 12:00:17 2003
@@ -1,3 +1,4 @@
+ - name=123 is passed as an integer (not a string) to plugins now (messju)
- $length is now propagated to sub-values in debug_print_var (messju)
Version 2.5.0-RC2 (March 26, 2003)
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.200 smarty/libs/Smarty_Compiler.class.php:1.201
--- smarty/libs/Smarty_Compiler.class.php:1.200 Tue Apr 1 10:23:16 2003
+++ smarty/libs/Smarty_Compiler.class.php Thu Apr 3 12:00:17 2003
@@ -38,7 +38,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.200 2003/04/01 15:23:16 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.201 2003/04/03 17:00:17 messju Exp $ */
class Smarty_Compiler extends Smarty {
@@ -1354,6 +1354,8 @@
$token = 'false';
} else if ($token == 'null') {
$token = 'null';
+ } else if (preg_match('!^-?[0-9]+$!', $token)) {
+ /* treat integer literally */
} else if (!preg_match('!^' . $this->_obj_call_regexp . '|' .
$this->_var_regexp . '(?:' . $this->_mod_regexp . ')*$!', $token)) {
/* treat as a string, double-quote it escaping quotes */
$token = '"'.addslashes($token).'"';