From 5d56da31179b57b328be0cded50d44c8ea434085 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 Apr 2026 18:05:41 +0200 Subject: [PATCH] Try to fix merge pb --- htdocs/core/class/extrafields.class.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 22747b917a6..cb0a231a041 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1485,10 +1485,6 @@ class ExtraFields $parentField = ''; $keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid'); - if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) { - list($parentName, $parentField) = explode('|', $InfoFieldList[3]); - $keyList .= ', '.$parentField; - } if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) { if (strpos($InfoFieldList[4], 'extra.') !== false) { $keyList = 'main.'.$InfoFieldList[2].' as rowid'; @@ -1496,6 +1492,14 @@ class ExtraFields $keyList = $InfoFieldList[2].' as rowid'; } } + if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) { + list($parentName, $parentField) = explode('|', $InfoFieldList[3]); + if (!empty($InfoFieldList[4]) && strpos($InfoFieldList[4], 'extra.') !== false) { + $keyList .= ', main.'.$parentField; + } else { + $keyList .= ', '.$parentField; + } + } $filter_categorie = false; if (count($InfoFieldList) > 5) {