cvs: smarty /libs Smarty.class.php /libs/core core.assemble_auto_filename.php

"Monte Ohrt" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmohrt1056577834@cvsserver>
mohrt		Wed Jun 25 17:50:34 2003 EDT

  Modified files:              
    /smarty/libs	Smarty.class.php 
    /smarty/libs/core	core.assemble_auto_filename.php 
  Log:
  fix SMARTY_COMPILE_DIR_SEP problem, make local var
  
  
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.419 smarty/libs/Smarty.class.php:1.420
--- smarty/libs/Smarty.class.php:1.419	Tue Jun 24 11:45:01 2003
+++ smarty/libs/Smarty.class.php	Wed Jun 25 17:50:34 2003
@@ -42,7 +42,7 @@
  * @version 2.5.0-cvs
  */
 
-/* $Id: Smarty.class.php,v 1.419 2003/06/24 15:45:01 mohrt Exp $ */
+/* $Id: Smarty.class.php,v 1.420 2003/06/25 21:50:34 mohrt Exp $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -1165,13 +1165,13 @@
     {
         static $_cache_info = array();
 
-		define('SMARTY_COMPILE_DIR_SEP', $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^');
+		$_compile_dir_sep =  $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
 		
 		$this->_cache_paths_file =
 				$this->compile_dir
 				. DIRECTORY_SEPARATOR
 				. '_smarty_cached_paths'
-				. SMARTY_COMPILE_DIR_SEP
+				. $_compile_dir_sep
 				. urlencode($resource_name)
 				. '.php';
 
Index: smarty/libs/core/core.assemble_auto_filename.php
diff -u smarty/libs/core/core.assemble_auto_filename.php:1.4 smarty/libs/core/core.assemble_auto_filename.php:1.5
--- smarty/libs/core/core.assemble_auto_filename.php:1.4	Tue Jun 24 11:45:02 2003
+++ smarty/libs/core/core.assemble_auto_filename.php	Wed Jun 25 17:50:34 2003
@@ -18,6 +18,8 @@
 function smarty_core_assemble_auto_filename($params, &$smarty)
 {	
 
+	$_compile_dir_sep =  $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
+		
     if(@is_dir($params['auto_base'])) {
         $_return = $params['auto_base'] . DIRECTORY_SEPARATOR;
     } else {
@@ -32,17 +34,17 @@
         // make auto_id safe for directory names
         $params['auto_id'] = str_replace('%7C','|',(urlencode($params['auto_id'])));
         // split into separate directories
-        $params['auto_id'] = str_replace('|', SMARTY_COMPILE_DIR_SEP, $params['auto_id']);
-        $_return .= $params['auto_id'] . SMARTY_COMPILE_DIR_SEP;
+        $params['auto_id'] = str_replace('|', $_compile_dir_sep, $params['auto_id']);
+        $_return .= $params['auto_id'] . $_compile_dir_sep;
     }
 
     if(isset($params['auto_source'])) {
         // make source name safe for filename
         $_filename = urlencode(basename($params['auto_source']));
-        $_crc32 = crc32($params['auto_source']) . SMARTY_COMPILE_DIR_SEP;
+        $_crc32 = crc32($params['auto_source']) . $_compile_dir_sep;
         // prepend %% to avoid name conflicts with
         // with $params['auto_id'] names
-        $_crc32 = '%%' . substr($_crc32,0,3) . SMARTY_COMPILE_DIR_SEP . '%%' . $_crc32;
+        $_crc32 = '%%' . substr($_crc32,0,3) . $_compile_dir_sep . '%%' . $_crc32;
         $_return .= $_crc32 . $_filename;
     }
 	



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