From 4863b0ff4e4c1d3c5c7ce7b42ad001750ed87c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Thu, 15 Dec 2022 09:22:36 +0100 Subject: [PATCH] FIX : duplicate tabs on external module with 5 params --- htdocs/core/lib/functions.lib.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d71c61909c1..c7172a9267f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -19,6 +19,7 @@ * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2022 Anthony Berton * Copyright (C) 2022 Ferran Marcet + * Copyright (C) 2022 Charlene Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -9385,6 +9386,17 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, continue; } if ($values[3]) { + if ($filterorigmodule) { // If a filter of module origin has been requested + if (strpos($values[3], '@')) { // This is an external module + if ($filterorigmodule != 'external') { + continue; + } + } else { // This looks a core module + if ($filterorigmodule != 'core') { + continue; + } + } + } $langs->load($values[3]); } if (preg_match('/SUBSTITUTION_([^_]+)/i', $values[2], $reg)) {