cvs: smarty / NEWS /libs Smarty_Compiler.class.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1088684444@cvsserver>
messju		Thu Jul  1 08:20:44 2004 EDT

  Modified files:              
    /smarty	NEWS 
    /smarty/libs	Smarty_Compiler.class.php 
  Log:
  fixed handling of digits inside tagnames. this problem slipped into
  the regexps by adding support for numeric contants next to string
  constants as variables.
  
  
  
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.457&r2=1.458&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.457 smarty/NEWS:1.458
--- smarty/NEWS:1.457	Sun Jun 27 15:37:34 2004
+++ smarty/NEWS	Thu Jul  1 08:20:43 2004
@@ -1,3 +1,4 @@
+  - fix handling of digits inside tagnames (messju)
   - fix escaping of backslashes in Smarty_Compiler::_quote_replace() (messju)
 
 Version 2.6.3 (June 16, 2004)
http://cvs.php.net/diff.php/smarty/libs/Smarty_Compiler.class.php?r1=1.323&r2=1.324&ty=u
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.323 smarty/libs/Smarty_Compiler.class.php:1.324
--- smarty/libs/Smarty_Compiler.class.php:1.323	Sun Jun 27 15:37:34 2004
+++ smarty/libs/Smarty_Compiler.class.php	Thu Jul  1 08:20:43 2004
@@ -26,7 +26,7 @@
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.323 2004/06/27 19:37:34 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.324 2004/07/01 12:20:43 messju Exp $ */
 
 /**
  * Template compiling class
@@ -137,7 +137,7 @@
         // #foo#
         // "text"
         // "text"
-        $this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_num_const_regexp . '|' . $this->_qstr_regexp . ')';
+        $this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_qstr_regexp . ')';
 
         // matches valid object call (no objects allowed in parameters):
         // $foo->bar
@@ -401,7 +401,7 @@
             return '';
 
         /* Split tag into two three parts: command, command modifiers and the arguments. */
-        if(! preg_match('/^(?:(' . $this->_obj_call_regexp . '|' . $this->_var_regexp
+        if(! preg_match('/^(?:(' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp
                 . '|\/?' . $this->_reg_obj_regexp . '|\/?' . $this->_func_regexp . ')(' . $this->_mod_regexp . '*))
                       (?:\s+(.*))?$
                     /xs', $template_tag, $match)) {
@@ -412,7 +412,7 @@
         $tag_modifier = isset($match[2]) ? $match[2] : null;
         $tag_args = isset($match[3]) ? $match[3] : null;
 
-        if (preg_match('!^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '$!', $tag_command)) {
+        if (preg_match('!^' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '$!', $tag_command)) {
             /* tag name is a variable or object */
             $_return = $this->_parse_var_props($tag_command . $tag_modifier, $this->_parse_attrs($tag_args));
             if(isset($_tag_attrs['assign'])) {

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.