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

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1069198506@cvsserver>
messju		Tue Nov 18 18:35:06 2003 EDT

  Modified files:              
    /smarty	NEWS 
    /smarty/libs	Smarty.class.php Smarty_Compiler.class.php 
  Log:
  move Smarty::quote_replace() to Smarty_Compiler::_quote_replace()
  
  
  
Index: smarty/NEWS
diff -u smarty/NEWS:1.403 smarty/NEWS:1.404
--- smarty/NEWS:1.403	Thu Nov 13 12:35:51 2003
+++ smarty/NEWS	Tue Nov 18 18:35:04 2003
@@ -1,3 +1,7 @@
+  - move Smarty::quote_replace() to Smarty_Compiler::_quote_replace() (messju)
+  - remove import of of attributes of {include_php} to php's namespace.
+    use $params[name] instead (messju)
+
 Version 2.6.0-RC3 (Nov 13, 2003)
 --------------------------------
 
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.457 smarty/libs/Smarty.class.php:1.458
--- smarty/libs/Smarty.class.php:1.457	Tue Nov 18 18:18:35 2003
+++ smarty/libs/Smarty.class.php	Tue Nov 18 18:35:05 2003
@@ -43,7 +43,7 @@
  * @version 2.6.0-RC3-cvs
  */
 
-/* $Id: Smarty.class.php,v 1.457 2003/11/18 23:18:35 messju Exp $ */
+/* $Id: Smarty.class.php,v 1.458 2003/11/18 23:35:05 messju Exp $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -1390,17 +1390,6 @@
     }
 
     /**
-     * Quote subpattern references
-     *
-     * @param string $string
-     * @return string
-     */
-    function quote_replace($string)
-    {
-        return preg_replace('![\\$]\d!', '\\\\\\0', $string);
-    }
-
-    /**
      * get filepath of requested plugin
      *
      * @param string $type
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.295 smarty/libs/Smarty_Compiler.class.php:1.296
--- smarty/libs/Smarty_Compiler.class.php:1.295	Thu Nov 13 12:35:52 2003
+++ smarty/libs/Smarty_Compiler.class.php	Tue Nov 18 18:35:05 2003
@@ -39,7 +39,7 @@
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.295 2003/11/13 17:35:52 mohrt Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.296 2003/11/18 23:35:05 messju Exp $ */
 
 /**
  * Template compiling class
@@ -265,13 +265,13 @@
         preg_match_all("!{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}!s", $source_content, $_match);
         $this->_literal_blocks = $_match[1];
         $source_content = preg_replace("!{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}!s",
-                                        $this->quote_replace($this->left_delimiter.'literal'.$this->right_delimiter), $source_content);
+                                        $this->_quote_replace($this->left_delimiter.'literal'.$this->right_delimiter), $source_content);
 
         /* Pull out the php code blocks. */
         preg_match_all("!{$ldq}php{$rdq}(.*?){$ldq}/php{$rdq}!s", $source_content, $_match);
         $this->_php_blocks = $_match[1];
         $source_content = preg_replace("!{$ldq}php{$rdq}(.*?){$ldq}/php{$rdq}!s",
-                                        $this->quote_replace($this->left_delimiter.'php'.$this->right_delimiter), $source_content);
+                                        $this->_quote_replace($this->left_delimiter.'php'.$this->right_delimiter), $source_content);
 
         /* Gather all template tags. */
         preg_match_all("!{$ldq}\s*(.*?)\s*{$rdq}!s", $source_content, $_match);
@@ -336,7 +336,7 @@
             $strip_tags_modified = preg_replace('![\r\n]+!m', '', $strip_tags_modified);
             for ($i = 0, $for_max = count($strip_tags); $i < $for_max; $i++)
                 $compiled_content = preg_replace("!{$ldq}strip{$rdq}.*?{$ldq}/strip{$rdq}!s",
-                                                  $this->quote_replace($strip_tags_modified[$i]),
+                                                  $this->_quote_replace($strip_tags_modified[$i]),
                                                   $compiled_content, 1);
         }
 
@@ -2033,6 +2033,17 @@
 
 
     /**
+     * Quote subpattern references
+     *
+     * @param string $string
+     * @return string
+     */
+    function _quote_replace($string)
+    {
+        return preg_replace('![\\$]\d!', '\\\\\\0', $string);
+    }
+
+    /**
      * display Smarty syntax error
      *
      * @param string $error_msg

-- 
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.