From: vincent@cubedesigners.com Date: Fri, 7 Jan 2011 13:07:07 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3ad1f6b54b5b98e7d8ad47bf21329456606ea2f9;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index df7139e9a..c2bc4baf4 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -59,10 +59,11 @@ class wsAjax extends cubeAjax { global $core; $dao = new wsDAOBook($core->con); if ($_POST['book'] != '') { - $book = $dao->duplicate($_POST['book'], $core->user->utilisateur_id); + $book = $dao->duplicate($_POST['book'], $core->user->utilisateur_id,$_POST['title']); } else { - $book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang); + $book = $dao->creeEmpty($core->user->utilisateur_id, $core->user->lang,$_POST['title']); } + $x->addClosePopup(); $x->addContent('listeBooks', wsUrl::listeBooks()); $x->addTruePopup(SITE_PATH . 'editor/' . $book->book_id); @@ -77,7 +78,7 @@ class wsAjax extends cubeAjax { } $x->addOk('book_proprietaire'); $dao = new wsDAOBook($core->con); - $dao->setProprietaire($args[1],$_POST['proprietaire']); + $dao->setProprietaire($args[1], $_POST['proprietaire']); $x->addClosePopup(); $x->addContent('listeBooks', wsUrl::listeBooks()); } diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 9b8bf34b5..b9e1a0579 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -229,6 +229,8 @@ html{height:100%}' . "\n"; { $res = '

' . __("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 .= '
'; + $res .= '' . __('Indiquez le titre de votre nouvelle publication') . '' . form::field('title', 64, 1024) . ''; return $res; } diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 3b020b94d..7e941ae69 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -103,7 +103,7 @@ class wsDAOBook extends extranetDAO { return $this->selectById($book_id); } - public function duplicate($book_id, $createur) + public function duplicate($book_id, $createur, $nom) { $r = $this->con->select('SELECT * FROM books_vue WHERE book_id=\'' . $this->con->escape($book_id) . '\''); $c = $this->con->openCursor('books'); @@ -115,7 +115,7 @@ class wsDAOBook extends extranetDAO { $c->date_status = TIME; $c->lang = $r->lang; $c->parametres = $r->parametres; - $c->nom = $r->nom; + $c->nom = $nom; $c->theme = $r->theme; $c->changedate = TIME; $c->compiledate = 0; @@ -125,10 +125,11 @@ class wsDAOBook extends extranetDAO { return $this->selectById($book_id); } - public function creeEmpty($createur, $lang) + public function creeEmpty($createur, $lang, $nom) { $c = $this->con->openCursor('books'); $c->proprietaire = $createur; + $c->nom = $nom; $c->date = TIME; $c->hash = md5(rand(0, 1234567893)); $c->compteur_visites = 20; @@ -166,10 +167,10 @@ class wsDAOBook extends extranetDAO { $c = unserialize($r->conversion); $c = $c->pages[$r->document_page]; } - if(isset($n[$r->document_page-1])){ - $num=$n[$r->document_page-1]; - }else{ - $num=''; + if (isset($n[$r->document_page-1])) { + $num = $n[$r->document_page-1]; + } else { + $num = ''; } $pages[$r->book_page] = array('document_id' => $r->document_id, 'document_page' => $r->document_page,