]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 18 Oct 2011 08:51:08 +0000 (08:51 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 18 Oct 2011 08:51:08 +0000 (08:51 +0000)
inc/ws/DAO/class.ws.dao.book.php

index 9e153949d8b13c49604c5337f6dd1a4e88c32367..5d987b9170302d6a5586318965b8fb3e81621bb4 100644 (file)
@@ -701,16 +701,6 @@ class wsDAOBook extends commonDAO {
                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
@@ -760,7 +750,7 @@ class wsDAOBook extends commonDAO {
                $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
@@ -822,13 +812,16 @@ class wsDAOBook extends commonDAO {
                                        $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