From f0405e13f627dc85ed4848313ca15a8ddb975f8c Mon Sep 17 00:00:00 2001 From: Cerdic <cedric@yterium.com> Date: Tue, 2 Feb 2021 12:42:11 +0100 Subject: [PATCH] Une option force_refresh sur la fonction taille_image pour forcer une mise a jour depuis le disque (si l'image a ete modifiee) #4449 --- ecrire/inc/filtres.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ecrire/inc/filtres.php b/ecrire/inc/filtres.php index bf538256ab..1461f9c2e8 100644 --- a/ecrire/inc/filtres.php +++ b/ecrire/inc/filtres.php @@ -549,7 +549,7 @@ function image_filtrer($args) { * @return array * Liste (hauteur, largeur) en pixels **/ -function taille_image($img) { +function taille_image($img, $force_refresh = false) { static $largeur_img = array(), $hauteur_img = array(); $srcWidth = 0; @@ -576,10 +576,10 @@ function taille_image($img) { } $srcsize = false; - if (isset($largeur_img[$src])) { + if (isset($largeur_img[$src]) and !$force_refresh) { $srcWidth = $largeur_img[$src]; } - if (isset($hauteur_img[$src])) { + if (isset($hauteur_img[$src]) and !$force_refresh) { $srcHeight = $hauteur_img[$src]; } if (!$srcWidth or !$srcHeight) { -- GitLab