From: Vincent Vanwaelscappel Date: Wed, 14 Feb 2024 15:47:29 +0000 (+0100) Subject: wait #6729 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e3d37ad650e30453a344dd817cf7967b144eeb19;p=fluidbook_tools.git wait #6729 @0.5 --- diff --git a/src/Links/Link.php b/src/Links/Link.php index 9850516..8e7610b 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -15,7 +15,6 @@ use Cubist\Util\Text; use Cubist\Util\Xml; use Fluidbook\Tools\Compiler\CompilerInterface; use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\Log; use SodiumException; use stdClass; @@ -258,11 +257,12 @@ class Link if (stristr($init['to'], '.zip')) { $d = $compiler->unzipFile($init['to'], false, null, true); if (Files::count($d['dir']) === 1) { + $zname = str_replace('.', '_', $init['to']); $it = new RecursiveDirectoryIterator($d['dir']); foreach ($it as $item) { /** @var $item \SplFileInfo */ - copy($item->getPathname(), $compiler->getWorkingDir() . '/' . $item->getFilename()); - $init['to'] = $item->getFilename(); + copy($item->getPathname(), $compiler->getWorkingDir() . '/' . $zname . '_' . $item->getFilename()); + $init['to'] = $zname . '_' . $item->getFilename(); return new HTMLMultimediaPopupImage($id, $init, $compiler); } @@ -612,7 +612,7 @@ class Link } $attached = $this->attached ? ' data-attached="' . $this->attached . '" ' : ''; - return '
' . $this->getHTMLContent() . '
'; + return '
' . $this->getHTMLContent() . '
'; } public function getHTMLContainerClass()