]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 7 Apr 2011 09:28:31 +0000 (09:28 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 7 Apr 2011 09:28:31 +0000 (09:28 +0000)
inc/ws/DAO/class.ws.dao.book.php

index ef22f10fdf032e9aa253eff5605f9b17634a84be..d563659a69879eb7a49c53c5cf9dd7789b453c30 100644 (file)
@@ -596,6 +596,7 @@ class wsDAOBook extends commonDAO {
 \r
                $daoLang = new wsDAOLang($this->con);\r
                $lang = $daoLang->selectById($book->lang);\r
+               $langs = $daoLang->selectAll();\r
 \r
                $daoTheme = new wsDAOTheme($this->con);\r
                $theme = $daoTheme->getThemeOfBook($book_id, true);\r
@@ -628,8 +629,13 @@ class wsDAOBook extends commonDAO {
                $flexLight->addVariable('id', $book_id, false, true, 'uint');\r
 \r
                $traductions = (!count($book->traductions))?$lang->traductions:$book->traductions;\r
+               $allTraductions = array();\r
+               foreach($langs as $lang) {\r
+                       $allTraductions[$lang->lang_id] = $lang->traductions;\r
+               }\r
 \r
                $flex->addVariable('traductions', $traductions, false, true, 'JSONObject');\r
+               $flex->addVariable('allTraductions', $allTraductions, false, true, 'JSONObject');\r
                $flex->addVariable('chapters', $book->chapters, false, true, 'JSONObject');\r
                $flex->addVariable('extras', '<extras>' . $book->extras . '</extras>', false, true, 'XML');\r
                $flex->addVariable('numerotation', $book->numerotation, false, true, 'String');\r
@@ -655,7 +661,7 @@ class wsDAOBook extends commonDAO {
                        if ($complete) {\r
                                $flex->addSWF($swffile, 'page' . $i);\r
                        } else {\r
-                               $filesToCopy['data/p' . $i. '.swf'] = $swffile;\r
+                               $filesToCopy['data/p' . $i . '.swf'] = $swffile;\r
                        }\r
 \r
                        if ($i == 1) {\r