From: vincent@cubedesigners.com Date: Thu, 17 Mar 2022 17:50:26 +0000 (+0000) Subject: wait #5054 @2.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ee48c5ff630cdc1247b564dfc51f67eb24816242;p=cubeextranet.git wait #5054 @2.5 --- 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 fb5f6c473..fbbc3f692 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -3150,12 +3150,8 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->vdir->copyDirectory($source, $dest); } - public function simpleCopyLinkFile($source, $dest, $addVdir = true) + public function simpleCopyLinkFile($source, $dest) { - if ($addVdir) { - $dest = $dest; - } - if (stripos($source, '.svg') !== false) { $source = $this->_fixSVG($source); } diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index a46a704ba..5c7ff4661 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -2964,7 +2964,9 @@ class slideshowLink extends normalLink $this->copyExternalDir($d['dir'], $d['fdir']); $this->path = $d['fdir']; - $this->path_absolute = $this->compiler->vdir->path($d['fdir']); + + // Do not use path from vdir. It can not be in sync with the source files + $this->path_absolute = $d['dir']; return '#/slideshow/' . $this->uid; } @@ -2989,6 +2991,8 @@ class slideshowLink extends normalLink $this->allowed_extensions = ['jpg', 'png', 'jpeg', 'gif', 'svg']; + $this->getURL(); + $slideshowID = 'slideshow_' . $this->uid; $XML_path = $this->path_absolute . '/slideshow.xml'; // Optional file so it may not exist @@ -2998,7 +3002,7 @@ class slideshowLink extends normalLink 'fade' => false, ]; - $this->getURL(); + $slides = []; $slides_options = []; @@ -3041,14 +3045,13 @@ class slideshowLink extends normalLink if (empty($slides)) { $slides = $this->_getSlidesFromDirectory($this->path_absolute); } - } else { // Or by default, just get all the images that were in the zip file... $slides = $this->_getSlidesFromDirectory($this->path_absolute); - $thumbnails = (count($slides) > 1); } + // Main slider $res = '
' . $this->_slides($slides, $slides_options) . '
'; @@ -3058,9 +3061,7 @@ class slideshowLink extends normalLink } $lib = $context === 'popup' ? $this->compiler->book->parametres->popupSlideshowLibrary : $this->compiler->book->parametres->inlineSlideshowLibrary; - $res = '
' . $res . '
'; - - return $res; + return '
' . $res . '
'; } protected function _getSlidesFromDirectory($path) @@ -3102,7 +3103,7 @@ class slideshowLink extends normalLink $res .= '