]> _ Git - cubeextranet.git/commitdiff
wait #5148 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 7 Mar 2022 16:17:18 +0000 (16:17 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 7 Mar 2022 16:17:18 +0000 (16:17 +0000)
inc/ws/Metier/class.ws.document.php

index 0fbb8911a9177cd4b5e90bf38ae7f85346552778..b9027769aaee1106407442c90973a35e652813f3 100644 (file)
@@ -417,9 +417,11 @@ class wsDocument extends cubeMetier
 
     public function getFilesData()
     {
+
         if ($this->filesdata === null) {
+            $limit = time() - 604800;
             $f = $this->out . '/filesdata.json';
-            if (file_exists($f)) {
+            if (file_exists($f) && filemtime($f) > $limit) {
                 $this->filesdata = json_decode(file_get_contents($f), true);
             } else {
                 $this->filesdata = [];
@@ -491,6 +493,8 @@ class wsDocument extends cubeMetier
 
         if ($do || $force) {
             $this->makeFile($file, $page, $format, $resolution, $withText, $withGraphics, $version);
+        } else {
+            touch($file);
         }
 
         return $file;