[PHPTAL] Stupid little patch v2

Julien Fredon julien.fredon at imaginance.com
Tue Dec 4 12:55:32 CET 2007


A patch of 2 word ... with 1 error .... shame on me :-(
This is the good version.

-- 
Jules
-------------- section suivante --------------
Index: C:/Documents and Settings/Julien/workspace_v3.3/PHPTAL/classes/PHPTAL/Php/Attribute/PHPTAL/Cache.php
===================================================================
--- C:/Documents and Settings/Julien/workspace_v3.3/PHPTAL/classes/PHPTAL/Php/Attribute/PHPTAL/Cache.php	(revision 316)
+++ C:/Documents and Settings/Julien/workspace_v3.3/PHPTAL/classes/PHPTAL/Php/Attribute/PHPTAL/Cache.php	(working copy)
@@ -74,7 +74,7 @@
              $this->tag->generator->doSetVar($this->cache_tag, '('.$code.')."@".' . $old_cache_tag );
         }
     
-        $cond = 'time() - '.$cache_len.' > @filemtime(__FILE__.md5('.$this->cache_tag.'))';
+        $cond = '! file_exists(__FILE__.md5('.$this->cache_tag.')) || time() - '.$cache_len.' > @filemtime(__FILE__.md5('.$this->cache_tag.'))';
 
         $this->tag->generator->doIf($cond);
         $this->tag->generator->doEval('ob_start()');


More information about the PHPTAL mailing list