From: vincent@cubedesigners.com Date: Tue, 18 Oct 2011 08:51:08 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1d58b79d2fdf3fa06d244e48d59f8741cf0c3a58;p=cubeextranet.git --- diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 9e153949d..5d987b917 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -701,16 +701,6 @@ class wsDAOBook extends commonDAO { if (!file_exists($finalDir . 'data')) { mkdir($finalDir . 'data', 0777, true); } - // Check working dir - if (file_exists($workingDir)) { - $dr = opendir($workingDir); - while ($file = readdir($dr)) { - if ($file == '.' || $file == '..') { - continue; - } - $filesToCopy['data/' . $file] = $workingDir . '/' . $file; - } - } foreach ($filesToCopy as $local => $source) { $localPath = $finalDir . $local; @@ -760,7 +750,7 @@ class wsDAOBook extends commonDAO { $this->compileFlex($book_id, true, $compilerDir, $finalDir, $filesToCopy, $book, $pages, $flex, $flex); $res = $flex->compile(); - $air = new cubeAIRCompiler( $swf . '.swf', '/usr/local/flex/bin', $compilerDir, '2.0'); + $air = new cubeAIRCompiler($swf . '.swf', '/usr/local/flex/bin', $compilerDir, '2.0'); $air->setApplicationDatas('com.fluidbook' . $book_id, $book->parametres->title, $book->parametres->title, cubeText::str2URL($book->parametres->title), $book->lang); $air->setInitialWindow($book->parametres->title); $res.=$air->compile(); @@ -822,13 +812,16 @@ class wsDAOBook extends commonDAO { $flex->addBitmap($workingDir . '/' . $link['to'], 'link_datas_' . $id); } $imagesassets[$id] = true; + } else if (in_array($link['type'], array(4, 6, 7, 9, 16, 17))) { + $workingFile = $workingDir . '/' . $link['to']; + if (file_exists($workingFile)) { + $filesToCopy['data/' . $link['to']] = $workingFile; + } } } $flex->addVariable('links', $links, false, true, 'JSONObject'); - - $flex->addVariable('signature', $exportSignature, false, true, 'JSONObject'); $flexLight->addVariable('datas', $book->parametres->toStandardObject(), false, true, 'JSONObject'); $flexLight->addVariable('id', $book_id, false, true, 'uint');