From 62995eb54a98717b2b3f909a79ca1e0dad577cae Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 25 May 2011 13:07:01 +0000 Subject: [PATCH] --- inc/commons/class.common.core.php | 2 + inc/ws/Controlleur/class.ws.ajax.php | 2 +- inc/ws/Controlleur/class.ws.flash.php | 5 +- inc/ws/Controlleur/class.ws.url.php | 187 +++++++++++++++++++++++++- inc/ws/DAO/class.ws.dao.document.php | 32 +++-- 5 files changed, 215 insertions(+), 13 deletions(-) diff --git a/inc/commons/class.common.core.php b/inc/commons/class.common.core.php index c0e927ffa..02a7caf5b 100644 --- a/inc/commons/class.common.core.php +++ b/inc/commons/class.common.core.php @@ -347,6 +347,8 @@ class commonCore extends cubeCore { $db->document_links_versions->document_id('integer', 0, false); $db->document_links_versions->links('text', 0, false); $db->document_links_versions->rulers('text', 0, false); + $db->document_links_versions->comments('varchar', 32, false); + $db->document_links_versions->user('integer', 0, false); $db->document_links_versions->update('integer', 0, false); // . $db->document_links_versions->primary('pk_document_links_version', 'document_id', 'update'); diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index c4bae8d1f..133f72d17 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -684,7 +684,7 @@ class wsAjax extends cubeAjax { $date = $args[2]; $dao = new wsDAODocument($core->con); - $dao->restoreLinksVersion($book_id, $date); + $dao->restoreLinksVersion($book_id, $date,$core->user->utilisateur_id); } } diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 665a2399e..f1ba71670 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -453,8 +453,11 @@ class wsFlash extends cubeFlashGateway { public function saveLinks() { global $core; + + $comments=isset($this->args['comments'])?$this->args['comments']:'Saved from editor'; + $dao = new wsDAODocument($core->con); - $dao->setLinksAndRulers($this->args['book_id'], $this->args['links'], $this->args['rulers']); + $dao->setLinksAndRulers($this->args['book_id'], $this->args['links'], $this->args['rulers'],$comments,$core->user->utilisateur_id); $daoBook = new wsDAOBook($core->con); $daoBook->setSpecialLinksAndRulers($this->args['book_id'], $this->args['specialLinks'], $this->args['specialRulers']); diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index df7bb0f80..23300e059 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -342,11 +342,20 @@ html{height:100%}' . "\n"; $res .= ''; $res .= ''; $res .= '