]> _ Git - cubeextranet.git/commitdiff
fix #2180 @0:35
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 13 Aug 2018 15:23:59 +0000 (15:23 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 13 Aug 2018 15:23:59 +0000 (15:23 +0000)
inc/ws/Metier/class.ws.document.php
inc/ws/Util/class.ws.tools.php

index 1e6798826a411d3835f50e8799ce2adffb36c1bf..82e82e3f11d47b928e38f042d8fdb6f25e2ede5f 100644 (file)
@@ -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)
index a614bce311def2263a86cfdfe6d92a7f21e12dec..12aa2d5423d84a4cb277930c1fd822df6768bed7 100644 (file)
@@ -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);