From 8198276d64856cd7fe9cf27c9d6a9e39c63dce7f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 13 Aug 2019 17:47:30 +0200 Subject: [PATCH 1/2] FIX for MAIN_MAXTABS_IN_CARD = $i card --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e9f4301f8f2..a46bd661eb2 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1130,7 +1130,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) { // If active tab is already present - if ($i >= $limittoshow) $limittoshow--; + if ($i > $limittoshow) $limittoshow--; } } @@ -1146,7 +1146,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab $isactive=false; } - if ($i < $limittoshow || $isactive) + if ($i <= $limittoshow || $isactive) { $out.='
'; if (isset($links[$i][2]) && $links[$i][2] == 'image') From 93d64bb84e3278891a52332bae037a31df58329f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 13 Aug 2019 17:59:19 +0200 Subject: [PATCH 2/2] Update functions.lib.php --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a46bd661eb2..9d85ab85048 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1130,7 +1130,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) { // If active tab is already present - if ($i > $limittoshow) $limittoshow--; + if ($i >= $limittoshow) $limittoshow--; } }