From 105ad4cd991a77cb3dfdb43da406d0b5db019dc4 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 7 Apr 2011 09:28:31 +0000 Subject: [PATCH] --- inc/ws/DAO/class.ws.dao.book.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index ef22f10fd..d563659a6 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -596,6 +596,7 @@ class wsDAOBook extends commonDAO { $daoLang = new wsDAOLang($this->con); $lang = $daoLang->selectById($book->lang); + $langs = $daoLang->selectAll(); $daoTheme = new wsDAOTheme($this->con); $theme = $daoTheme->getThemeOfBook($book_id, true); @@ -628,8 +629,13 @@ class wsDAOBook extends commonDAO { $flexLight->addVariable('id', $book_id, false, true, 'uint'); $traductions = (!count($book->traductions))?$lang->traductions:$book->traductions; + $allTraductions = array(); + foreach($langs as $lang) { + $allTraductions[$lang->lang_id] = $lang->traductions; + } $flex->addVariable('traductions', $traductions, false, true, 'JSONObject'); + $flex->addVariable('allTraductions', $allTraductions, false, true, 'JSONObject'); $flex->addVariable('chapters', $book->chapters, false, true, 'JSONObject'); $flex->addVariable('extras', '' . $book->extras . '', false, true, 'XML'); $flex->addVariable('numerotation', $book->numerotation, false, true, 'String'); @@ -655,7 +661,7 @@ class wsDAOBook extends commonDAO { if ($complete) { $flex->addSWF($swffile, 'page' . $i); } else { - $filesToCopy['data/p' . $i. '.swf'] = $swffile; + $filesToCopy['data/p' . $i . '.swf'] = $swffile; } if ($i == 1) { -- 2.39.5