]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 25 Feb 2011 16:00:18 +0000 (16:00 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 25 Feb 2011 16:00:18 +0000 (16:00 +0000)
inc/ws/Controlleur/class.ws.conversion.session.php

index 5ffc586684863b47209427af35b74c3b8db46231..a04ae652855bebcf00d0884aea0b6ccd7dca93d7 100644 (file)
@@ -19,7 +19,7 @@ class wsConversionSession {
        protected $bookId = null;\r
        public $reload = false;\r
 \r
-       protected $nb_threads = 4;\r
+       protected $nb_threads = 8;\r
        protected $threads;\r
 \r
        public function __construct($guid)\r
@@ -63,7 +63,7 @@ class wsConversionSession {
 \r
        protected function initThreads()\r
        {\r
-               if (!cubeThread::available()) {\r
+               if (!cubeThread::available() || $this->nb_threads <= 1) {\r
                        return;\r
                }\r
                $this->threads = array();\r
@@ -106,7 +106,7 @@ class wsConversionSession {
 \r
                                $this->setProgress(($this->processedPages / $this->totalPages) * 100);\r
 \r
-                               if (cubeThread::available()) {\r
+                               if (cubeThread::available() && $this->nb_threads > 1) {\r
                                        $t = $this->threads[$i % $this->nb_threads];\r
                                        while ($t->isAlive()) {\r
                                                usleep(100000);\r
@@ -126,11 +126,11 @@ class wsConversionSession {
                        }\r
                        $this->setProgress(($this->processedPages / $this->totalPages) * 100);\r
 \r
-                       $doc = $dao->updateFromObject($doc);\r
+                       $this->currentDoc = $dao->updateFromObject($this->currentDoc);\r
                        if (!$this->reload) {\r
                                // On n'ajoute les fichiers à la fin du fluidbook que si l'on\r
                                // n'est pas en train de recharger le fluidbook\r
-                               $daoBook->appendDocument($this->bookId, $doc->document_id);\r
+                               $daoBook->appendDocument($this->bookId, $this->currentDoc->document_id);\r
                        }\r
                        $this->processedDoc++;\r
                }\r