]> _ Git - cubeextranet.git/commitdiff
wait #3677
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 9 Jun 2020 14:53:39 +0000 (14:53 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 9 Jun 2020 14:53:39 +0000 (14:53 +0000)
inc/ws/Metier/class.ws.document.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index cd78df410052d5385606990641329003baa4bbef..38fdd394b56da14c0ec7934dbf425fa43ecd4dd3 100644 (file)
@@ -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)
index 111ebe66f6de7d05076afd60c7b7107a1c503c86..44dea3069c27d07a89801ccc7a159983642ebed2 100644 (file)
@@ -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) {