]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 12 Apr 2012 15:34:23 +0000 (15:34 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 12 Apr 2012 15:34:23 +0000 (15:34 +0000)
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Metier/class.ws.book.parametres.php

index 9afd1f3b6776770d73cfbb0924de421234612a15..2f8fc18ac9c53221a1e7f872bbcad5990689f9a7 100644 (file)
@@ -781,13 +781,19 @@ class wsDAOBook extends commonDAO {
                        return;\r
                }\r
 \r
+               fb(time(), 'Start compile 3');\r
                $res = $this->compile3($book_id, $complete, $book);\r
-               $this->compile1($book_id);\r
+               fb(time(), 'Start compile 1');\r
+               if ($book->parametres->version == 1) {\r
+                       $this->compile1($book_id);\r
+               }\r
                $this->touchCompile($book_id);\r
+               fb(time(), 'End compile');\r
                return $res;\r
        }\r
 \r
        public function compile1($book_id) {\r
+\r
                $finalDir = WS_BOOKS . '/finalv1/' . $book_id . '/';\r
                $packager = new wsPackagerV1($book_id, $finalDir, false);\r
                $packager->makePackage(false);\r
@@ -809,12 +815,16 @@ class wsDAOBook extends commonDAO {
                $book = $this->selectById($book_id);\r
                $pages = $this->getPagesOfBook($book_id);\r
 \r
+               fb(time(), 'prepare flex');\r
+\r
                $flex = new cubeFlexCompiler('FluidbookDatas', $compilerDir, 'flash.display.Sprite', explode(';', AS3_SOURCES), MXMLC_PATH, 10);\r
                $flexLight = new cubeFlexCompiler('FluidbookDatasLight', $compilerDir, 'flash.display.Sprite', explode(';', AS3_SOURCES), MXMLC_PATH, 10);\r
 \r
                $filesToCopy = array();\r
                $this->compileFlex($book_id, $complete, $compilerDir, $finalDir, $filesToCopy, $book, $pages, $flex, $flexLight);\r
 \r
+               fb(time(), 'compile flex');\r
+\r
                $res .= $flex->compile() . "\n\n-------------------\n\n";\r
                $flexLight->addVariable('datasSize', filesize($compilerDir . '/FluidbookDatas.swf'));\r
                $res .= $flexLight->compile();\r
@@ -822,12 +832,16 @@ class wsDAOBook extends commonDAO {
                $filesToCopy['data/fd.swf'] = $compilerDir . '/FluidbookDatas.swf';\r
                $filesToCopy['data/fdl.swf'] = $compilerDir . '/FluidbookDatasLight.swf';\r
 \r
+               fb(time(), 'flex compiled');\r
+\r
                // Copy of files\r
                // Check if dest dir exists\r
                if (!file_exists($finalDir . 'data')) {\r
                        mkdir($finalDir . 'data', 0777, true);\r
                }\r
 \r
+               fb(time(), 'copy files');\r
+\r
                foreach ($filesToCopy as $local => $source) {\r
                        $localPath = $finalDir . $local;\r
                        if (!file_exists($localPath) || filemtime($localPath) < filemtime($source) || filesize($localPath) != filesize($source) || filemtime($localPath) < $book->composition_update) {\r
@@ -838,11 +852,14 @@ class wsDAOBook extends commonDAO {
                        }\r
                }\r
 \r
+               fb(time(), 'Compile PDF');\r
 \r
                $this->compilePDF($book, $pages);\r
                if ($book->parametres->mobileVersion != 'pdf') {\r
+                       fb(time(), 'Compile HTML5');\r
                        $this->compileHTML5($book_id);\r
                }\r
+               fb(time(), 'Compile widget');\r
                $this->compileWidget($book, $pages);\r
                $this->touchCompile($book_id);\r
 \r
@@ -921,7 +938,12 @@ class wsDAOBook extends commonDAO {
                $hash .= round($size[0], 4);\r
                $hash = sha1($hash);\r
 \r
+               fb(time(), 'texts and indexes');\r
+\r
                $this->makeTextsIndexes($book, $pages, $index, $textes);\r
+\r
+               fb(time(), 'texts and links');\r
+\r
                $daoDoc->getLinksAndRulers($book_id, $links, $rulers);\r
 \r
                $imagesassets = array();\r
index 01dfb3eec75d794b9bfa9f6a99f53f644dc945ce..ff93a49cdf5c1186388b6064bad5eec8840744e2 100644 (file)
@@ -47,8 +47,8 @@ class wsBookParametres extends wsParametres {
                // .\r
                // .\r
                $this->fields['friend'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Envoyer à un ami'));\r
-               $this->fields['email_title'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de l'email") . ' "' . __('Envoyer à un ami') . '"');\r
-               $this->fields['email_body'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __("Corps de l'email") . ' "' . __('Envoyer à un ami') . '"');\r
+               $this->fields['email_title'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de l'email") . ' "' . __('Envoyer à un ami') . '"', 'hint' => __('Laisser vide pour utiliser la valeur par défaut'));\r
+               $this->fields['email_body'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __("Corps de l'email") . ' "' . __('Envoyer à un ami') . '"', 'hint' => __('Laisser vide pour utiliser la valeur par défaut'));\r
                $this->fields['email_editable'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Permettre au lecteur de modifier le corps de l'email"));\r
                $this->fields['askAcknowledge'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Demander au destinataire un accusé de réception"), 'grade' => 3);\r
                $this->fields['facebook'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Facebook'));\r