From: vincent@cubedesigners.com Date: Mon, 30 Jan 2023 18:10:03 +0000 (+0000) Subject: wip #5701 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=120b0ad9079559cb71d5f7c527d4942132a18e48;p=cubeextranet.git wip #5701 @0.5 --- diff --git a/inc/config.inc.php b/inc/config.inc.php index c8fb348dc..b60173643 100644 --- a/inc/config.inc.php +++ b/inc/config.inc.php @@ -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'); diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 0d8a9d354..18e9e1cbf 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -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'); diff --git a/inc/ws/Metier/class.ws.book.php b/inc/ws/Metier/class.ws.book.php index 15cbbc395..5b7de131d 100644 --- a/inc/ws/Metier/class.ws.book.php +++ b/inc/ws/Metier/class.ws.book.php @@ -111,6 +111,9 @@ class wsBook extends cubeMetier public function getAssetDir($sub = '') { + if($this->region==='US'){ + return rtrim(US_BOOKS . '/working/' . $this->getAssetDirId() . '/' . trim($sub, '/'), '/') . '/'; + } return rtrim(WS_BOOKS . '/working/' . $this->getAssetDirId() . '/' . trim($sub, '/'), '/') . '/'; }