From e20ca7c19755aa909dce97ac12803e5125a4d742 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 9 Jun 2020 14:53:39 +0000 Subject: [PATCH] wait #3677 --- inc/ws/Metier/class.ws.document.php | 55 ++++++++++--------- .../html5/master/class.ws.html5.compiler.php | 4 +- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index cd78df410..38fdd394b 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -1074,32 +1074,37 @@ class wsDocument extends cubeMetier public static function getDir($id) { - if (!is_array(self::$_docsDir)) { - self::$_docsDir = array(); - } - - if (isset(self::$_docsDir[$id])) { - return self::$_docsDir[$id]; - } - - $d = 5; - for ($i = 0; $i <= $d; $i++) { - $docs = 'docs'; - if ($i > 0) { - $docs .= '' . $i; - } - $dir = WS_FILES . '/' . $docs . '/' . $id . '/'; - if (file_exists($dir . 'p1.swf')) { - self::$_docsDir[$id] = $dir; - return $dir; - } - } - $d0 = WS_FILES . '/docs/' . $id . '/'; - if (!file_exists($d0)) { - mkdir($d0, 0777, true); + $res = WS_DOCS . '/' . $id . '/'; + if (!file_exists($res)) { + mkdir($res, 0777, true); } - self::$_docsDir[$id] = $d0; - return $d0; + return $res; +// if (!is_array(self::$_docsDir)) { +// self::$_docsDir = array(); +// } +// +// if (isset(self::$_docsDir[$id])) { +// return self::$_docsDir[$id]; +// } +// +// $d = 5; +// for ($i = 0; $i <= $d; $i++) { +// $docs = 'docs'; +// if ($i > 0) { +// $docs .= '' . $i; +// } +// $dir = WS_FILES . '/' . $docs . '/' . $id . '/'; +// if (file_exists($dir . 'p1.swf')) { +// self::$_docsDir[$id] = $dir; +// return $dir; +// } +// } +// $d0 = WS_FILES . '/docs/' . $id . '/'; +// if (!file_exists($d0)) { +// mkdir($d0, 0777, true); +// } +// self::$_docsDir[$id] = $d0; +// return $d0; } public static function makeHTML5FilesIfNotExists($document_id, $document_page) 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 111ebe66f..44dea3069 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1065,7 +1065,7 @@ class wsHTML5Compiler { if ($this->book->parametres->scorm_version == '1.2') { $manifestfile = '_imsmanifest.12.xml'; - } elseif ($this->book->parametres->scorm_version = '2004') { + } elseif ($this->book->parametres->scorm_version == '2004') { $manifestfile = '_imsmanifest.2004.xml'; } @@ -1073,7 +1073,7 @@ class wsHTML5Compiler if (!$this->book->parametres->scorm_title) { $this->book->parametres->scorm_title = $this->book->parametres->title; } - if (!$this->book->parametres->scorm_id || ($this->book->book_id > 16614 && $this->book->parametres->scorm_id == 'MFMCTE091mobile')) { + if (!$this->book->parametres->scorm_id || ($this->book->book_id > 16614 && $this->book->parametres->scorm_id === 'MFMCTE091mobile')) { $this->book->parametres->scorm_id = 'fb_' . $this->book->book_id; } if (!$this->book->parametres->scorm_org) { -- 2.39.5