From 2f9fdbae6754c8922b3fa89872cda7e502972b28 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 13 Aug 2018 15:23:59 +0000 Subject: [PATCH] fix #2180 @0:35 --- inc/ws/Metier/class.ws.document.php | 9 --------- inc/ws/Util/class.ws.tools.php | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index 1e6798826..82e82e3f1 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -710,15 +710,6 @@ class wsDocument extends cubeMetier } } file_put_contents($textFile, $svg->saveXML()); - //return $svglog; - } - - protected function _cleanSVG($svgFile, $page) - { - $svglog = self::cleanSVG($svgFile); - - $this->addToLog(implode("\n", $svglog), false, $page); - } protected function checkObjectsNumber($file, $maxObjects, $page) diff --git a/inc/ws/Util/class.ws.tools.php b/inc/ws/Util/class.ws.tools.php index a614bce31..12aa2d542 100644 --- a/inc/ws/Util/class.ws.tools.php +++ b/inc/ws/Util/class.ws.tools.php @@ -175,12 +175,12 @@ class wsTools { if ($optimize) { - $cmd = "timeout -s 1 2 /usr/local/bin/svgcleaner --allow-bigger-file --paths-coordinates-precision 3 --copy-on-error --stdout $original"; + $cmd = "timeout -s 1 10 /usr/local/bin/svgcleaner --allow-bigger-file --paths-coordinates-precision 3 --copy-on-error --stdout $original"; $svg = `$cmd`; if ($svg == '') { $svg = file_get_contents($original); } - $svg = substr_replace($svg, 'preserveAspectRatio="none" ', 5, 0); + $svg = substr_replace($svg, ' preserveAspectRatio="none" ', 5, 0); $fname = $baseoptimized; file_put_contents($fname, $svg); -- 2.39.5