From: vincent@cubedesigners.com Date: Wed, 12 Jan 2022 12:41:38 +0000 (+0000) Subject: wait #5020 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f23de3204ddad0f53d5014945f09d414930fa080;p=cubeextranet.git wait #5020 @0.5 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 213f65ca0..d0c46bdda 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -30,7 +30,7 @@ class wsHTML5Compiler 'js/libs/jquery/jquery.mousewheel.min.js', 'js/libs/jquery/jquery.hashchange.min.js', 'js/libs/jquery/jquery.scrollto.min.js', - ], + ], 'aria' => ['js/libs/aria/radio.js',], 'bluebird' => ['js/libs/bluebird.min.js'], 'screenfull' => ['js/libs/screenfull.min.js'], @@ -3474,6 +3474,19 @@ height="0" width="0" style="display:none;visibility:hidden"> $list = $this->config->articlesList ?? []; $nb = count($list); + + usort($list, function ($a, $b) { + if ($a['page'] == $b['page']) { + $ea = explode('-', $a['id']); + $eb = explode('-', $b['id']); + if (is_numeric($ea[0]) && is_numeric($eb[0])) { + return $ea[0] - $eb[0]; + } + return strcmp($a['id'], $b['id']); + } + return $a['page'] - $b['page']; + }); + foreach ($list as $k => $item) { $nextIndex = ($k + 1) % $nb; $prevIndex = ($k - 1 + $nb) % $nb;