From: vincent@cubedesigners.com Date: Mon, 3 Jan 2011 17:24:54 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=abb7b12cfd09ebc4ee9da68628e54028f1309aaa;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index a4dac86f9..43022f433 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -233,7 +233,7 @@ html{height:100%}' . "\n"; $dao = new wsDAOBook($core->con); header('Content-type: text/plain'); ob_clean(); - echo $dao->compile(2964, 3, false); + echo $dao->compile(2970, 3, false); exit; } diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 94d57be40..0afe5c99c 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -462,9 +462,14 @@ class wsDAOBook extends extranetDAO { $twords = explode("\n", trim($ipage)); foreach($twords as $woadata) { + list($woa, $worddata) = explode(',', trim($woadata)); list($total, $wordslist) = explode("\t", $worddata, 2); + if($woa==''){ + continue; + } + if (!isset($index[$woa])) { $index[$woa] = array('total' => 0, 'words' => array()); } @@ -508,7 +513,7 @@ class wsDAOBook extends extranetDAO { */ public function compile3($book_id, $complete) { - set_time_limit(0); + //cubePHP::neverStop(); $filesToCopy = array(); $finalDir = WS_BOOKS . '/final/' . $book_id . '/'; @@ -541,22 +546,22 @@ class wsDAOBook extends extranetDAO { $flex = new cubeFlexCompiler('FluidbookDatas', $compilerDir, 'flash.display.Sprite', explode(';', AS3_SOURCES), MXMLC_PATH); $flexLight = new cubeFlexCompiler('FluidbookDatasLight', $compilerDir, 'flash.display.Sprite', explode(';', AS3_SOURCES), MXMLC_PATH); - $flex->addVariable('links', $book->links); - $flex->addVariable('signature', $exportSignature); - $flexLight->addVariable('datas', $book->parametres->toStandardObject()); + $flex->addVariable('links', $book->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'); - $flex->addVariable('traductions', wsLang::getTraductionWithId($book->traductions)); - $flex->addVariable('chapters', $book->chapters); + $flex->addVariable('traductions', wsLang::getTraductionWithId($book->traductions),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'); - $flexLight->addVariable('theme', $theme->parametres->toStandardObject()); + $flexLight->addVariable('theme', $theme->parametres->toStandardObject(),false,true,'JSONObject'); $flexLight->addVariable('pages', count($pages)); $flexLight->addVariable('fwidth', round($size[0]), false, true, 'Number'); $flexLight->addVariable('fheight', round($size[1]), false, true, 'Number'); $flexLight->addVariable('pagesInDatas', $complete, false, true, 'Boolean'); - $flex->addVariable('index', $index); - $flex->addVariable('textes', $textes); + $flex->addVariable('index', $index,false,true,'JSONObject'); + $flex->addVariable('textes', $textes,false,true,'JSONObject'); foreach($pages as $i => $infos) { $swffile = WS_DOCS . '/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf'; if ($i == 1) {