if (!file_exists($finalDir . 'data')) {\r
mkdir($finalDir . 'data', 0777, true);\r
}\r
- // Check working dir\r
- if (file_exists($workingDir)) {\r
- $dr = opendir($workingDir);\r
- while ($file = readdir($dr)) {\r
- if ($file == '.' || $file == '..') {\r
- continue;\r
- }\r
- $filesToCopy['data/' . $file] = $workingDir . '/' . $file;\r
- }\r
- }\r
\r
foreach ($filesToCopy as $local => $source) {\r
$localPath = $finalDir . $local;\r
$this->compileFlex($book_id, true, $compilerDir, $finalDir, $filesToCopy, $book, $pages, $flex, $flex);\r
$res = $flex->compile();\r
\r
- $air = new cubeAIRCompiler( $swf . '.swf', '/usr/local/flex/bin', $compilerDir, '2.0');\r
+ $air = new cubeAIRCompiler($swf . '.swf', '/usr/local/flex/bin', $compilerDir, '2.0');\r
$air->setApplicationDatas('com.fluidbook' . $book_id, $book->parametres->title, $book->parametres->title, cubeText::str2URL($book->parametres->title), $book->lang);\r
$air->setInitialWindow($book->parametres->title);\r
$res.=$air->compile();\r
$flex->addBitmap($workingDir . '/' . $link['to'], 'link_datas_' . $id);\r
}\r
$imagesassets[$id] = true;\r
+ } else if (in_array($link['type'], array(4, 6, 7, 9, 16, 17))) {\r
+ $workingFile = $workingDir . '/' . $link['to'];\r
+ if (file_exists($workingFile)) {\r
+ $filesToCopy['data/' . $link['to']] = $workingFile;\r
+ }\r
}\r
}\r
\r
$flex->addVariable('links', $links, false, true, 'JSONObject');\r
\r
-\r
-\r
$flex->addVariable('signature', $exportSignature, false, true, 'JSONObject');\r
$flexLight->addVariable('datas', $book->parametres->toStandardObject(), false, true, 'JSONObject');\r
$flexLight->addVariable('id', $book_id, false, true, 'uint');\r