From: vincent@cubedesigners.com Date: Thu, 17 Feb 2022 17:09:04 +0000 (+0000) Subject: wait #5110 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=55d53452179c3fe8f49783f9cae1a93ffd751277;p=cubeextranet.git wait #5110 @1.5 --- diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index 4e637c18d..0fbb8911a 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -431,7 +431,7 @@ class wsDocument extends cubeMetier public function getFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html', $force = false) { $this->getFilesData(); - $cacheKey = $page . '_' . $format . '_' . $resolution . '_' . ($withText ? '1' : '0') . '_' . ($withGraphics ? '1' : '0') . '_' . $version; + $cacheKey = md5($page . '||' . $format . '//' . $resolution . '""' . ($withText ? '1' : '0') . '---' . ($withGraphics ? '1' : '0') . '%%' . $version); if (!isset($this->filesdata[$cacheKey]) || $force) { $this->filesdata[$cacheKey] = $this->_getFile($page, $format, $resolution, $withText, $withGraphics, $version, $force); } @@ -472,7 +472,6 @@ class wsDocument extends cubeMetier $file = $dir . 'p' . $page . '.' . $format; } else { $file = $dir . $prefix . $page . '-' . $resolution . '.' . $format; - $alt = $dir . $prefix . $resolution . '-' . $page . '.' . $format; } } else if ($format === 'swf') { $file = $dir . 'p' . $page . '.' . $format; @@ -480,12 +479,7 @@ class wsDocument extends cubeMetier $do = false; if (!file_exists($file)) { - if (isset($alt) && file_exists($alt) && filesize($alt) > $minsize) { - rename($alt, $file); - $do = false; - } else { - $do = true; - } + $do = true; } else if (filesize($file) < $minsize) { $do = true; } else if (isset($reffile) && filemtime($file) < filemtime($reffile)) {