From: Vincent Vanwaelscappel Date: Fri, 10 Oct 2025 08:57:14 +0000 (+0200) Subject: wait #7784 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c9dd5b5d0e52af5dc5e12dcb7900c98eec97302c;p=fluidbook-toolbox.git wait #7784 @1 --- diff --git a/app/Fluidbook/Compiler/Cart.php b/app/Fluidbook/Compiler/Cart.php index 7ba5f64de..c6b81591c 100644 --- a/app/Fluidbook/Compiler/Cart.php +++ b/app/Fluidbook/Compiler/Cart.php @@ -276,11 +276,15 @@ trait Cart $cdir = $this->wdir . '/commerce/'; $file = $cdir . $this->fluidbookSettings->basketReferences; + $refmtime = filemtime($file); $this->config->basketReferences = ExcelToArray::excelToArrayKeyVars($file); foreach ($this->config->basketReferences as $ref => $data) { $dest = $cdir . $ref . '.jpg'; - if (!file_exists($dest)) { + if (is_link($dest)) { + unlink($dest); + } + if (!file_exists($dest) || filemtime($dest) < $refmtime) { if (!@copy($data['img'], $dest)) { $dest = $this->wdir . '/default.jpg'; }