From c51bc09e3974b940dd5aaaaebddf28f142776a52 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 Oct 2015 18:54:54 +0200 Subject: [PATCH] FIX The preview of PDF was never refreshed if PDF document was changed --- htdocs/comm/propal/apercu.php | 2 +- htdocs/commande/apercu.php | 2 +- htdocs/compta/facture/apercu.php | 2 +- htdocs/fichinter/apercu.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index 87281e7ea63..837dc48c670 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -144,7 +144,7 @@ if ($id > 0 || ! empty($ref)) print "\n"; // Conversion du PDF en image png si fichier png non existant - if (! file_exists($fileimage) && ! file_exists($fileimagebis)) + if ((! file_exists($fileimage) && ! file_exists($fileimagebis)) || (filemtime($fileimage) < filemtime($file))) { if (class_exists("Imagick")) { diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index f3d83b837dd..5d65ba1a493 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -142,7 +142,7 @@ if ($id > 0 || ! empty($ref)) print "\n"; // Conversion du PDF en image png si fichier png non existant - if (! file_exists($fileimage) && ! file_exists($fileimagebis)) + if ((! file_exists($fileimage) && ! file_exists($fileimagebis)) || (filemtime($fileimage) < filemtime($file))) { if (class_exists("Imagick")) { diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 340df8172dc..b649dd43c43 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -280,7 +280,7 @@ if ($id > 0 || ! empty($ref)) print "\n"; // Conversion du PDF en image png si fichier png non existant - if (! file_exists($fileimage) && ! file_exists($fileimagebis)) + if ((! file_exists($fileimage) && ! file_exists($fileimagebis)) || (filemtime($fileimage) < filemtime($file))) { if (class_exists("Imagick")) { diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php index 0d4d3421538..9e08fae27ab 100644 --- a/htdocs/fichinter/apercu.php +++ b/htdocs/fichinter/apercu.php @@ -124,7 +124,7 @@ if ($id > 0 || ! empty($ref)) print "\n"; // Conversion du PDF en image png si fichier png non existant - if (! file_exists($fileimage) && ! file_exists($fileimagebis)) + if ((! file_exists($fileimage) && ! file_exists($fileimagebis)) || (filemtime($fileimage) < filemtime($file))) { if (class_exists("Imagick")) {