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
$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
$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
}\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
$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
// .\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