From: vincent@cubedesigners.com Date: Tue, 23 Feb 2010 17:34:01 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3d67bd93c1593bd6e8093d13d4b1a3f2d57c1709;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/class.ws.conversion.session.php b/inc/ws/Controlleur/class.ws.conversion.session.php index dcd1e6e66..169af860c 100644 --- a/inc/ws/Controlleur/class.ws.conversion.session.php +++ b/inc/ws/Controlleur/class.ws.conversion.session.php @@ -15,6 +15,7 @@ class wsConversionSession { protected $totalDoc = 0; protected $processedPages = 0; protected $processedDoc = 0; + protected $bookId = null; public function __construct($guid) { @@ -26,6 +27,11 @@ class wsConversionSession { $this->documentsId = $documents; } + public function setBook($book_id) + { + $this->bookId = $book_id; + } + public function initDocuments() { global $core; @@ -43,9 +49,11 @@ class wsConversionSession { public function process() { + global $core; $this->processing = true; $this->initDocuments(); $this->serialize(); + $dao = new wsDAOBook($core->con); foreach($this->documents as $doc) { $this->currentDoc = $doc; @@ -56,6 +64,7 @@ class wsConversionSession { $doc->processOnePage($i); $this->processedPages++; } + $dao->appendDocument($this->bookId, $doc->document_id); $this->processedDoc++; } @@ -99,7 +108,6 @@ class wsConversionSession { public function __destruct() { - // $this->serialize(); } public static function openFromGUID($guid) diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 46fc00f9e..ecebd5093 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -71,6 +71,7 @@ class wsFlash extends cubeFlashGateway { $_SESSION['sessionConversionGUID'] = $sessionConversionGUID = uniqid('conversion_', true); $session = new wsConversionSession($sessionConversionGUID); $session->setDocuments($_SESSION['conversionSession']); + $session->setBook($this->args['book_id']); unset($_SESSION['conversionSession']); $session->serialize();