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

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1061201849@cvsserver>
messju		Mon Aug 18 06:17:29 2003 EDT

  Modified files:              
    /smarty/libs	Smarty.class.php 
    /smarty/libs/core	core.read_cache_file.php 
  Log:
  fixed unnecessary load of source in template_exists() and the
  compile-check of smarty_core_read_cache_file()
  
  
  
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.439 smarty/libs/Smarty.class.php:1.440
--- smarty/libs/Smarty.class.php:1.439	Thu Aug 14 12:44:02 2003
+++ smarty/libs/Smarty.class.php	Mon Aug 18 06:17:28 2003
@@ -43,7 +43,7 @@
  * @version 2.6.0-RC1-cvs
  */
 
-/* $Id: Smarty.class.php,v 1.439 2003/08/14 16:44:02 messju Exp $ */
+/* $Id: Smarty.class.php,v 1.440 2003/08/18 10:17:28 messju Exp $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -1108,7 +1108,7 @@
      */    
     function template_exists($tpl_file)
     {
-		$_params = array('resource_name' => $tpl_file);
+		$_params = array('resource_name' => $tpl_file, 'get_source'=>false);
         return $this->_fetch_resource_info($_params);
     }
 
Index: smarty/libs/core/core.read_cache_file.php
diff -u smarty/libs/core/core.read_cache_file.php:1.10 smarty/libs/core/core.read_cache_file.php:1.11
--- smarty/libs/core/core.read_cache_file.php:1.10	Thu Aug 14 12:44:03 2003
+++ smarty/libs/core/core.read_cache_file.php	Mon Aug 18 06:17:28 2003
@@ -68,8 +68,9 @@
     }
 
     if ($smarty->compile_check) {
+        $_params = array('get_source' => false); 
         foreach (array_keys($smarty->_cache_info['template']) as $_template_dep) {
-			$_params = array('resource_name' => $_template_dep);
+			$_params['resource_name'] = $_template_dep;
 			$smarty->_fetch_resource_info($_params);
             if ($smarty->_cache_info['timestamp'] < $_params['resource_timestamp']) {
                 // template file has changed, regenerate cache
@@ -78,7 +79,7 @@
         }
 
         if (isset($smarty->_cache_info['config'])) {
-            $_params = array('resource_base_path' => $smarty->config_dir); 
+            $_params = array('resource_base_path' => $smarty->config_dir, 'get_source' => false);
             foreach (array_keys($smarty->_cache_info['config']) as $_config_dep) {
                 $_params['resource_name'] = $_config_dep;
 				$smarty->_fetch_resource_info($_params);



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