]> _ Git - cubeextranet.git/commitdiff
fix #2181 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 14 Aug 2018 13:02:10 +0000 (13:02 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 14 Aug 2018 13:02:10 +0000 (13:02 +0000)
inc/ws/Util/class.ws.tools.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 12aa2d5423d84a4cb277930c1fd822df6768bed7..597656dd21420c69da3028edbd76c25185c34c5e 100644 (file)
@@ -175,7 +175,7 @@ class wsTools {
 
 
                if ($optimize) {
-                       $cmd = "timeout -s 1 10 /usr/local/bin/svgcleaner --allow-bigger-file --paths-coordinates-precision 3 --copy-on-error --stdout $original";
+                       $cmd = "timeout -s 1 20 /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);
index da513a1c255ea4abefd3b57b5f279433976a0709..72215cc39d30e889832f890f2878325ea5af53d5 100644 (file)
@@ -3,7 +3,6 @@
 class wsHTML5Compiler
 {
        public static $resolutions = array(150, 300);
-       public $maxRes = 300;
 
        public $jsFiles = array(
                'js/libs/modernizr/modernizr.min.js',
@@ -213,6 +212,7 @@ class wsHTML5Compiler
                $this->daoBook = new wsDAOBook($core->con);
                $this->book = $this->daoBook->selectById($book_id);
                $this->pages = $this->daoBook->getPagesOfBook($book_id);
+               $this->maxRes = min(300, $this->book->parametres->maxResolution);
 
 
                $daoTheme = new wsDAOTheme($core->con);
@@ -1816,7 +1816,6 @@ class wsHTML5Compiler
 
        }
 
-
        public function unzipFile($file, $moveAssets = false, $baseDir = null)
        {
                $fdir = is_null($baseDir) ? 'data/links/' . str_replace('.', '_', $file) : $baseDir;