From: vincent@cubedesigners.com Date: Thu, 7 Jul 2011 13:13:23 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=77a394feebf6708931bbc55bb29539bf3a129a78;p=cubeextranet.git --- diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index b85e4e107..825256f78 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -612,9 +612,18 @@ class wsDAOBook extends commonDAO { $flexLight = new cubeFlexCompiler('FluidbookDatasLight', $compilerDir, 'flash.display.Sprite', explode(';', AS3_SOURCES), MXMLC_PATH); $flex->addVariable('links', $links, false, true, 'JSONObject'); + $imagesassets = array(); foreach ($links as $link) { if ($link['type'] == 15) { - $flex->addBitmap($workingDir . '/' . $link['to'], 'link_datas_' . $link['id']); + if (isset($imagesassets[$link['id']])) { + continue; + } + if ($link['page'] <= 1) { + $flexLight->addBitmap($workingDir . '/' . $link['to'], 'link_datas_' . $link['id']); + } else { + $flex->addBitmap($workingDir . '/' . $link['to'], 'link_datas_' . $link['id']); + } + $imagesassets[$link['id']] = true; } }