From: vincent@cubedesigners.com Date: Fri, 17 Feb 2023 13:42:24 +0000 (+0000) Subject: wait #5742 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1b2075c4b91efeb6b2206bb578f01eb006da8878;p=cubeextranet.git wait #5742 @1 --- diff --git a/inc/config.inc.php b/inc/config.inc.php index 2d104b743..fd09324c7 100644 --- a/inc/config.inc.php +++ b/inc/config.inc.php @@ -76,3 +76,4 @@ define('TIMEZONE', 'UTC'); define('CUBE_SEARCH_LIMIT_CHARS', 3); define('PUBLIC_PATH', realpath(dirname(__FILE__) . '/..')); +define('FILES_PATH', PUBLIC_PATH . '/files'); 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 3c84a7304..327820c94 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -3658,7 +3658,8 @@ height="0" width="0" style="display:none;visibility:hidden"> } } - return array('dir' => $dir, 'fdir' => $fdir); + $res=['dir' => $dir, 'fdir' => $fdir]; + return $res; } public function getConfigZIP($d) 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 b237016e1..436a5fc79 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -3085,8 +3085,7 @@ class slideshowLink extends normalLink $this->copyExternalDir($d['dir'], $d['fdir']); $this->path = $d['fdir']; - - // Do not use path from vdir. It can not be in sync with the source files + // Do not use path from vdir. It can be not in sync with the source files $this->path_absolute = $d['dir']; return '#/slideshow/' . $this->uid; @@ -3155,8 +3154,7 @@ class slideshowLink extends normalLink $images = [$slideshowData->image]; } foreach ($images as $img) { - $full_path = $this->path_absolute . '/' . $img->_name; - $slides[] = ['caption' => $img->_caption, 'path' => $full_path]; + $slides[] = ['caption' => $img->_caption, 'path' => $this->path . '/' . $img->_name, 'absolute_path' => $this->path_absolute . '/' . $img->_name]; } } @@ -3171,7 +3169,6 @@ class slideshowLink extends normalLink $thumbnails = (count($slides) > 1); } - // Main slider $res = '
' . $this->_slides($slides, $slides_options) . '
'; @@ -3202,7 +3199,7 @@ class slideshowLink extends normalLink if (!in_array($ext, $this->allowed_extensions)) { continue; } - $slides[] = ['path' => $file->getPathname(), 'caption' => null]; + $slides[] = ['path' => $this->path . '/' . $file->getFilename(), 'absolute_path' => $file->getPathname(), 'caption' => null]; uasort($slides, [$this, '_orderSlidesByFilename']); } @@ -3223,8 +3220,7 @@ class slideshowLink extends normalLink $res .= '