From: Vincent Vanwaelscappel Date: Fri, 23 Feb 2024 16:44:02 +0000 (+0100) Subject: wip #6750 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=97d54a44641d98b15ebaa798fc3c053092f47756;p=fluidbook_tools.git wip #6750 --- diff --git a/src/SVG/SVGTools.php b/src/SVG/SVGTools.php index 70c007f..562d405 100644 --- a/src/SVG/SVGTools.php +++ b/src/SVG/SVGTools.php @@ -14,7 +14,7 @@ class SVGTools protected static $_e; protected static $_u; - public static function optimizeSVG($in, $out = null, $opt = '') + public static function optimizeSVG($in, $out = null, $opt = '', $force = false) { if (!str_ends_with(mb_strtolower($in), '.svg')) { return $in; @@ -28,7 +28,7 @@ class SVGTools $out = implode('.', $e); } - if (file_exists($out) && filemtime($out) >= filemtime($in) && filesize($out) === 0) { + if (!$force && file_exists($out) && filemtime($out) >= filemtime($in) && filesize($out) === 0) { return $out; }