From: vincent@cubedesigners.com Date: Tue, 9 Mar 2021 18:44:26 +0000 (+0000) Subject: wip #4253 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=17ebaa961916623e653fb65ece6bbd16a692a95e;p=cubeextranet.git wip #4253 @1 --- diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 583ffbbd2..5bc8b8d3d 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -279,15 +279,16 @@ class wsFlash extends cubeFlashGateway } $dest = $dir . $fname; move_uploaded_file($infos['tmp_name'], $dest); - switch (strtolower(files::getExtension($dest))) { - case 'flv': - case 'f4v': - case 'mp4': - // convert uploaded file as webvideo (ogv and mp4) - wsTools::encodeWebVideos($dest, null, true, false); - break; - case 'svg': - // Optimize & rasterize SVG + if (stripos($dir, 'commerce') === false) { + switch (strtolower(files::getExtension($dest))) { + case 'flv': + case 'f4v': + case 'mp4': + // convert uploaded file as webvideo (ogv and mp4) + wsTools::encodeWebVideos($dest, null, true, false); + break; + case 'svg': + // Optimize & rasterize SVG // $orig = str_replace('.svg', '.o.svg', $dest); // rename($dest, $orig); // $png = str_replace('.svg', '.png', $dest); @@ -296,9 +297,10 @@ class wsFlash extends cubeFlashGateway // copy($orig, $dest); // } // `convert -background none $dest $png`; - break; - default: - break; + break; + default: + break; + } } $this->xml->addChild('file', $fname); @@ -613,6 +615,7 @@ class wsFlash extends cubeFlashGateway $maxWidth = max($size[0], $maxWidth); $maxHeight = max($size[1], $maxHeight); + break; } wsLinks::getLinksAndRulersFromFile($this->args['book_id'], $links, $rulers); @@ -621,7 +624,7 @@ class wsFlash extends cubeFlashGateway $types = array(1, 2, 3, 4, 5, 6, 7, 11, 13, 14, 15, 16, 17, 18, 19, 24, 25); if (wsDroits::revendeur()) { - $types = array(1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25,26, 31, 33, 36, 40); + $types = array(1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26, 31, 33, 36, 40); } if (wsDroits::admin()) { $types = range(1, 100); diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 96e648d34..7c8cb6092 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -24,6 +24,7 @@ class wsHTML5Compiler 'jquery' => ['js/libs/jquery/jquery.min.js', ], + 'jquery-extras' => ['js/libs/jquery/jquery.transform.js', 'js/libs/jquery/jquery.form.min.js', 'js/libs/jquery/jquery.mousewheel.min.js', @@ -36,6 +37,7 @@ class wsHTML5Compiler 'forge' => ['js/libs/forge/forge-sha256.min.js',], 'perfectscrollbar' => ['js/libs/perfect-scrollbar/perfect-scrollbar.js', 'js/libs/perfect-scrollbar/perfect-scrollbar.jquery.js'], + 'confirm' => ['js/libs/jquery/jquery.confirm.min.js'], 'mmenu' => ['js/libs/mmenu/jquery.mmenu.all.js'], 'tweenmax' => @@ -476,12 +478,15 @@ class wsHTML5Compiler if (!file_exists($opt) || !filesize($opt) || filemtime($opt) < filemtime($f)) { // Optimize original video `ffmpeg -i $f -filter:v scale=360:-2 -vcodec libx264 -an $opt`; + touch($opt, filemtime($f)); } } else { if (in_array('front', $e)) { $type = 'front'; } else if (in_array('angle', $e)) { $type = 'angle'; + } else { + continue; } $n = $ean . '-' . $type . '.jpg'; $this->config->basketReferences[$ean][$type] = true; @@ -492,6 +497,7 @@ class wsHTML5Compiler $convert->loadImage($f); $convert->resize(1080, null, 'ratio', false, 'C', 'M', 'white'); $convert->output('jpg', $opt, 75); + touch($opt, filemtime($f)); } } $this->vdir->copy($opt, 'data/commerce/' . $n); @@ -577,6 +583,7 @@ class wsHTML5Compiler foreach ($links as $link) { if ($link['type'] == '12' && isset($this->config->basketReferences[$link['to']])) { $this->config->basketReferences[$link['to']]['zoom_image'] = 'data/links/zoom_' . $link['uid'] . '.jpg'; + $this->config->basketReferences[$link['to']]['zoom_url'] = base64_encode(file_get_contents($this->dir . '/data/links/zoom_' . $link['uid'] . '.jpg')); } } @@ -640,7 +647,7 @@ class wsHTML5Compiler } if (file_exists($referencesFile) || CubeIT_Util_Url::isDistant($referencesFile)) { $function = 'excelToArrayKeyValMulti'; - $this->config->product_zoom_references = wsUtil::$function($referencesFile); + $this->config->product_zoom_references = wsUtil::$function($referencesFile, 'Excel2007', true); } }