From 4d6149da46c7840e7d9bca94cbd3e9ac31537cb9 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 9 Dec 2016 16:13:35 +0000 Subject: [PATCH] wip #922 @4 --- .../class.extranet.page.chiffres.php | 10 ++++++++-- inc/ws/DAO/class.ws.dao.book.php | 18 ++++++++++++++++++ swf/_src/WSComposer.as3proj | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/inc/extranet/Controlleur/class.extranet.page.chiffres.php b/inc/extranet/Controlleur/class.extranet.page.chiffres.php index 3b5a8d27b..e912b8334 100644 --- a/inc/extranet/Controlleur/class.extranet.page.chiffres.php +++ b/inc/extranet/Controlleur/class.extranet.page.chiffres.php @@ -603,6 +603,7 @@ class extranetPageChiffres { $precision = 1 / $pas; $data = array(); $max = 0; + $total = 0; while ($r->fetch()) { $n = min(300, cubeMath::round($r->nb_pages, $precision, 'ceil')); if (!isset($data[$n])) { @@ -610,14 +611,16 @@ class extranetPageChiffres { } $data[$n]++; $max = max($max, $n); + $total++; } - fb($max); + for ($i = 0; $i <= $max; $i += $pas) { if (!isset($data[$i])) { $data[$i] = 0; } } + ksort($data); $res = commonPage::bh(); @@ -630,13 +633,16 @@ class extranetPageChiffres { $res .= '' . __("Quantité") . ''; $res .= ''; - foreach ($data as $pages => $qty) { $res .= ''; $res .= '' . $pages . ''; $res .= '' . $qty . ''; $res .= ''; } + $res .= ''; + $res .= '' . __('Total') . ''; + $res .= '' . $total . ''; + $res .= ''; $res .= ''; diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 4d589e003..f0444726b 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -1222,6 +1222,24 @@ class wsDAOBook extends commonDAO { $ignoreLinks = array(); foreach ($links as $id => $link) { $links[$id]['id'] = $id; + + if (isset($link['image']) && $link['image']) { + $workingFile = $workingDir . '/' . $link['image']; + $assetId = 'link_datas_i_' . md5($link['image']); + + if (isset($imagesassets[$assetId])) { + continue; + } + if (file_exists($workingFile)) { + if ($link['page'] <= 1) { + $flexLight->addBitmap($workingFile, $assetId); + } else { + $flex->addBitmap($workingFile, $assetId); + } + } + $imagesassets[$assetId] = true; + } + if ($link['type'] == 15) { if (isset($imagesassets[$id])) { continue; diff --git a/swf/_src/WSComposer.as3proj b/swf/_src/WSComposer.as3proj index b7643243a..aba683de2 100644 --- a/swf/_src/WSComposer.as3proj +++ b/swf/_src/WSComposer.as3proj @@ -91,7 +91,7 @@ - "$(ToolsDir)\PuTTY\pscp.exe" "$(OutputDir)\$(OutputName)" extranet@extranet.cubedesigners.com:/home/extranet/www/swf + "H:\Applications\PortableApps\PuTTYPortable\App\PuTTY\pscp.exe" -agent -batch "$(OutputDir)\$(OutputName)" extranet@extranet.cubedesigners.com:/home/extranet/www/swf