From: vincent@cubedesigners.com Date: Thu, 15 Dec 2022 16:12:06 +0000 (+0000) Subject: wait #5650 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c74bf49bb7861d470590ab802b2bf6a700785b11;p=cubeextranet.git wait #5650 @0.75 --- 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 6c911d8e5..a5a6b3d72 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1156,6 +1156,7 @@ class wsHTML5Compiler if ($this->book->parametres->scorm_enable) { $this->book->parametres->seoVersion = false; } + if ($this->book->parametres->embedAllLibraries) { $this->addVideoJs(); $this->addSlideshowLibrary(false); @@ -1718,19 +1719,23 @@ height="0" width="0" style="display:none;visibility:hidden"> if ($this->theme->parametres->favicon != '') { $pngFile = $this->checkThemeImage($this->theme->parametres->favicon); - $icoFile = $this->checkThemeImage('favicon.ico'); + $icoFile = $this->checkThemeImage('favicon.ico', false); if (!file_exists($icoFile) || filemtime($icoFile) < filemtime($pngFile) || filemtime(__FILE__) > filemtime($icoFile)) { $tmp = CubeIT_Files::tempnam() . '.png'; $convert = "convert $pngFile -resize 64x64^ -gravity center $tmp"; `$convert`; - $icotool = new cubeCommandLine('icotool'); + $icotool = new CubeIT_CommandLine('icotool'); $icotool->setArg('c'); $icotool->setArg('o', $icoFile); $icotool->setArg(null, $tmp); $icotool->execute(); + if (!file_exists($icoFile)) { + die('error while generating ico ' . $icoFile); + } + unlink($tmp); } @@ -3255,7 +3260,7 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->log('Write CSS'); } - protected function checkThemeImage($path) + protected function checkThemeImage($path, $checkExists = true) { $path = trim($path); $path = trim($path, '/'); @@ -3263,7 +3268,7 @@ height="0" width="0" style="display:none;visibility:hidden"> return false; } $p = $this->themeRoot . '/' . $path; - if (file_exists($p)) { + if (!$checkExists || file_exists($p)) { return $p; } $po = str_replace('.svg', '.o.svg', $p);