DataObjects/Core_templatestr.php
authorAlan Knowles <alan@roojs.com>
Fri, 26 Feb 2021 03:46:00 +0000 (11:46 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 26 Feb 2021 03:46:00 +0000 (11:46 +0800)
DataObjects/Core_templatestr.php

index d199cfe..df89f0b 100644 (file)
@@ -604,9 +604,18 @@ class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject
         
     }
     
-    // determine if a complied template need recompling
     
     function translateChanged($flexy)
+    {
+        
+        $date = $this->lastUpdated($flexy);
+        $utime = file_exists($flexy->compiledTemplate) ?  filemtime( $flexy->compiledTemplate) : 0;
+        return strtotime($date) > $utime;
+    }
+    
+    // determine if a complied template need recompling
+    
+    function lastUpdated($flexy)
     {
         //return true;
         // var_dump('check changed?');