From 905d508de51ba9fd9323536aa844118ef8b3e82b Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 30 Jan 2023 17:58:22 +0000 Subject: [PATCH] wip #5701 @1 --- .docker/docker-compose.yml | 3 +++ inc/commons/class.common.core.php | 1 + inc/ws/Controlleur/class.ws.ajax.php | 4 ++-- inc/ws/Controlleur/class.ws.url.php | 1 + inc/ws/DAO/class.ws.dao.book.php | 26 ++++++++++++++++++++++---- inc/ws/Metier/class.ws.book.php | 1 + 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 24ccfd3d7..d1839f077 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -11,6 +11,7 @@ services: - '/home/extranet/www/:/application/' - '/home/extranet/share:/application/share' - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/fluidbook/docs/' + - '/mnt/sshfs/kingkong/:/application/usstorage/' - '/home/toolbox/www/resources/fluidbookpublication/player:/application/fluidbook/compile/player' - '/data/extranet/www/fluidbook/books/audiodescription:/application/fluidbook/books/audiodescription' - '/data/extranet/www/fluidbook/books/index:/application/fluidbook/books/index' @@ -51,6 +52,7 @@ services: - '/home/extranet/www/:/application/' - '/home/extranet/share:/application/share' - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/fluidbook/docs/' + - '/mnt/sshfs/kingkong/:/application/usstorage/' - '/home/toolbox/www/resources/fluidbookpublication/player:/application/fluidbook/compile/player' - '/data/extranet/www/fluidbook/books/audiodescription:/application/fluidbook/books/audiodescription' - '/data/extranet/www/fluidbook/books/index:/application/fluidbook/books/index' @@ -127,6 +129,7 @@ services: - '/home/extranet/www/:/application/' - '/home/extranet/share:/application/share' - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/fluidbook/docs/' + - '/mnt/sshfs/kingkong/:/application/usstorage/' - '/home/toolbox/www/resources/fluidbookpublication/player:/application/fluidbook/compile/player' - '/data/extranet/www/fluidbook/books/audiodescription:/application/fluidbook/books/audiodescription' - '/data/extranet/www/fluidbook/books/index:/application/fluidbook/books/index' diff --git a/inc/commons/class.common.core.php b/inc/commons/class.common.core.php index c93ec2e9b..7c6a354f5 100644 --- a/inc/commons/class.common.core.php +++ b/inc/commons/class.common.core.php @@ -351,6 +351,7 @@ class commonCore extends cubeCore $db->books->book_id('integer', 0, false); $db->books->cid('varchar', 8, false); $db->books->nom('varchar', 256, false); + $db->books->region('varchar', 2, false, '"UE"'); $db->books->lang('varchar', 20, false); $db->books->theme('integer', 0, false); $db->books->proprietaire('integer', 0, false); diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index 91f0e0541..44efcc897 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -206,10 +206,10 @@ class wsAjax extends cubeAjax global $core; $dao = new wsDAOBook($core->con); if ($_POST['book'] != '') { - $book = $dao->duplicate($_POST['book'], $core->user->utilisateur_id, $_POST['title'], isset($_POST['pages'])); + $book = $dao->duplicate($_POST['book'], $core->user->utilisateur_id, $_POST['title'], isset($_POST['pages']), false, $_POST['region']); wsMaintenance::copyLinks([$_POST['book'], $book->book_id]); } else { - $book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang, $_POST['title']); + $book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang, $_POST['title'], $_POST['region']); } $x->addClosePopup(); diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 46e041fed..3617cb34e 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -1279,6 +1279,7 @@ html,body{height:100%;cursor: wait;font-family: "Open Sans", Arial;background-co $res = '

a' . __("Si votre nouvelle publication a des paramètres en commun avec une publication existante, veuillez rechercher cette publication afin d'attribuer par défaut à votre nouvelle publication les paramètres de l'existante") . '

'; $res .= '' . __('Rechercher une publication') . ' : ' . form::field('book_nom', 64, 1024) . form::hidden('book', '') . ''; $res .= '' . __('Indiquez le titre de votre nouvelle publication') . '' . form::field('title', 64, 1024) . ''; + $res .= '' . __('Région d\'hébergement des données') . '' . form::combo('region', [__('Union européenne') => 'UE', __('USA') => 'US'], "UE") . ''; $res .= '