]> _ Git - cubeextranet.git/commitdiff
wip #5701 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 30 Jan 2023 18:10:03 +0000 (18:10 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 30 Jan 2023 18:10:03 +0000 (18:10 +0000)
inc/config.inc.php
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Metier/class.ws.book.php

index c8fb348dc62852145b3ef31c76ddfee739f80946..b60173643558958076970cbd3885c528db51f3d9 100644 (file)
@@ -40,6 +40,18 @@ define('WS_SOUNDS', WS_FILES . '/sounds');
 define('WS_TOOLS', WS_FILES . '/tools');
 define('WS_PACKAGER', WS_FILES . '/packager');
 
+define('UUS_FILES', '/application/usstorage/');
+define('US_BOOKS', US_FILES . '/books');
+define('US_COLLECTIONS', US_FILES . '/collections');
+define('US_DOCS', US_FILES . '/docs');
+define('US_ICONS', US_FILES . '/icones');
+define('US_THEMES', US_FILES . '/themes');
+define('US_CACHE', US_FILES . '/cache');
+define('US_COMPILE_ASSETS', US_FILES . '/compile');
+define('US_SOUNDS', US_FILES . '/sounds');
+define('US_TOOLS', US_FILES . '/tools');
+define('US_PACKAGER', US_FILES . '/packager');
+
 define('WORKER_PREFIX', 'worker.');
 
 define('CACHE', ROOT . '/cache');
index 0d8a9d35481eb73f5e77829ebc906ac0ee5bbd64..18e9e1cbff5cce1ee34f3a579134cd1dddc53493 100644 (file)
@@ -250,9 +250,6 @@ class wsDAOBook extends commonDAO
     public function duplicate($book_id, $createur, $nom = null, $pages = false, $complete = false, $region = 'UE')
     {
         $nextId = $this->getNextId();
-        if ($region === 'US') {
-            $this->initUSStorage($nextId);
-        }
 
         $r = $this->con->select('SELECT * FROM books_vue WHERE book_id=\'' . $this->con->escape($book_id) . '\'');
 
@@ -310,9 +307,6 @@ class wsDAOBook extends commonDAO
     public function creeEmpty($createur, $lang, $nom, $region)
     {
         $nextId = $this->getNextId();
-        if ($region === 'US') {
-            $this->initUSStorage($nextId);
-        }
 
         $c = $this->con->openCursor('books');
 
index 15cbbc395eec755cd9743f31272a202c56e1cd96..5b7de131d33e2f3fcb4f3ebb93235afc302f6daa 100644 (file)
@@ -111,6 +111,9 @@ class wsBook extends cubeMetier
 \r
     public function getAssetDir($sub = '')\r
     {\r
+        if($this->region==='US'){\r
+            return rtrim(US_BOOKS . '/working/' . $this->getAssetDirId() . '/' . trim($sub, '/'), '/') . '/';\r
+        }\r
         return rtrim(WS_BOOKS . '/working/' . $this->getAssetDirId() . '/' . trim($sub, '/'), '/') . '/';\r
     }\r
 \r