From: vincent@cubedesigners.com Date: Fri, 19 Aug 2016 14:02:59 +0000 (+0000) Subject: fix #602 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f0ddd7d456f53c147011a897d394dad8e9833cc2;p=fluidbook-v3.git fix #602 @0.75 --- diff --git a/framework/application/views/helpers/Exemples.php b/framework/application/views/helpers/Exemples.php index 82d6a54..0c3d583 100644 --- a/framework/application/views/helpers/Exemples.php +++ b/framework/application/views/helpers/Exemples.php @@ -55,6 +55,14 @@ class Fluidbook_View_Helper_Exemples extends CubeIT_View_Helper_Abstract { $featured[] = array_shift($normal); } } + $nb_featured = count($featured); + + if ($nb_featured > $max_featured) { + for ($i = $max_featured; $i < $nb_featured; $i++) { + $normal[] = array_pop($featured); + } + } + $nb_featured = count($featured); $featured = array_slice($featured, 0, $max_featured); $normal = array_slice($normal, 0, $max_normal);