[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-cvs
Subject:    [SMARTY-CVS] cvs: smarty /libs/core core.write_cache_paths_file.php core.write_compiled_include.php
From:       "Messju Mohr" <messju () php ! net>
Date:       2003-06-22 22:10:10
[Download RAW message or body]

messju		Sun Jun 22 18:10:10 2003 EDT

  Modified files:              
    /smarty/libs/core	core.write_cache_paths_file.php 
                     	core.write_compiled_include.php 
  Log:
  fix in compiled-include-handling
  
  
Index: smarty/libs/core/core.write_cache_paths_file.php
diff -u smarty/libs/core/core.write_cache_paths_file.php:1.3 \
                smarty/libs/core/core.write_cache_paths_file.php:1.4
--- smarty/libs/core/core.write_cache_paths_file.php:1.3	Sat Jun 21 23:13:25 2003
+++ smarty/libs/core/core.write_cache_paths_file.php	Sun Jun 22 18:10:10 2003
@@ -27,8 +27,8 @@
 	$_compiled_content = '<?php $smarty->_cache_paths = ' . $_compiled_content . '; \
?>';  $_params = array('compile_path' => $smarty->_cache_paths_file, \
'compiled_content' => $_compiled_content, 'resource_timestamp' => time());  \
require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . \
                'core.write_compiled_resource.php');
-	smarty_core_write_compiled_resource($_params, $smarty);
-return $_return;
+	return smarty_core_write_compiled_resource($_params, $smarty);
+    return $_return;
 }
 
 /* vim: set expandtab: */
Index: smarty/libs/core/core.write_compiled_include.php
diff -u smarty/libs/core/core.write_compiled_include.php:1.4 \
                smarty/libs/core/core.write_compiled_include.php:1.5
--- smarty/libs/core/core.write_compiled_include.php:1.4	Sat Jun 21 23:13:25 2003
+++ smarty/libs/core/core.write_compiled_include.php	Sun Jun 22 18:10:10 2003
@@ -16,8 +16,8 @@
  
 function smarty_core_write_compiled_include($params, &$smarty)
 {
-    $_tag_start = 'if \(\$smarty->caching\) \{ echo \
                \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\';\}';
-    $_tag_end   = 'if \(\$smarty->caching\) \{ echo \
\'\{/nocache\:(\\2)#(\\3)\}\';\}'; +    $_tag_start = 'if \(\$this->caching\) \{ echo \
\'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\';\}'; +    $_tag_end   = 'if \
\(\$this->caching\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\';\}';  
     preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us', 
                    $params['compiled_content'], $_match_source, PREG_SET_ORDER);
@@ -30,15 +30,15 @@
 
     $_compile_path = $params['include_file_path'];
 
-    $smarty->_cache_serials[$_compile_path] = $smarty->_cache_serial;
-    $_include_compiled .= "\$smarty->_cache_serials['".$smarty->_cache_include."'] = \
'".$smarty->_cache_serial."';\n\n?>"; +    $smarty->_cache_serials[$_compile_path] = \
$smarty->params['cache_serial']; +    $_include_compiled .= \
"\$this->_cache_serials['".$_compile_path."'] = \
'".$params['cache_serial']."';\n\n?>";  
     $_include_compiled .= $params['plugins_code'];
     $_include_compiled .= "<?";
     for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) {
         $_match =& $_match_source[$_i];
         $_include_compiled .= "
-function _smarty_tplfunc_$_match[2]_$_match[3](&\$smarty)
+function _smarty_tplfunc_$_match[2]_$_match[3](&\$this)
 {
 $_match[4]
 }



-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic