DataObjects/Core_template.php
authorAlan Knowles <alan@roojs.com>
Fri, 4 Dec 2020 04:25:15 +0000 (12:25 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 4 Dec 2020 04:25:15 +0000 (12:25 +0800)
DataObjects/Core_template.php

index 89086f7..fa7aa15 100644 (file)
@@ -451,8 +451,16 @@ WHERE (
         $ts->selectAdd('MAX(updated) as updated');
         $ts->lang = $lang;
         $ts->template_id = $d->id;
-        $ts->
-        
+        if (!$ts->find(true)) {
+            // then in theory there are no translations
+            return;
+        }
+        if (file_exists($fd) && strtotime($ts->update) < filemtime($fd)) {
+            return; // file exists and is newer than our updated line.
+        }
+        $ts = DB_DataObject::Factory('core_templatestr');
+        $ts->autoJoin();
+