Skip to content

Commit eb62fc3

Browse files
FIX: Fix the construct of SQL request when key field parent for dependent list is provided on extrafields and object fields
1 parent 8c5ae9f commit eb62fc3

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

htdocs/core/class/commonobject.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8091,17 +8091,17 @@ function handlemultiinputdisabling(htmlname){
80918091

80928092
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
80938093

8094-
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
8095-
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
8096-
$keyList .= ', '.$parentField;
8097-
}
80988094
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
80998095
if (strpos($InfoFieldList[4], 'extra.') !== false) {
81008096
$keyList = 'main.'.$InfoFieldList[2].' as rowid';
81018097
} else {
81028098
$keyList = $InfoFieldList[2].' as rowid';
81038099
}
81048100
}
8101+
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
8102+
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
8103+
$keyList .= ', '.$parentField;
8104+
}
81058105

81068106
$filter_categorie = false;
81078107
if (count($InfoFieldList) > 5) {

htdocs/core/class/extrafields.class.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,17 +1421,17 @@ public function showInputField($key, $value, $moreparam = '', $keysuffix = '', $
14211421
$parentField = '';
14221422
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
14231423

1424-
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
1425-
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
1426-
$keyList .= ', '.$parentField;
1427-
}
14281424
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
14291425
if (strpos($InfoFieldList[4], 'extra.') !== false) {
14301426
$keyList = 'main.'.$InfoFieldList[2].' as rowid';
14311427
} else {
14321428
$keyList = $InfoFieldList[2].' as rowid';
14331429
}
14341430
}
1431+
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
1432+
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
1433+
$keyList .= ', '.$parentField;
1434+
}
14351435

14361436
$filter_categorie = false;
14371437
if (count($InfoFieldList) > 5) {
@@ -1647,17 +1647,17 @@ public function showInputField($key, $value, $moreparam = '', $keysuffix = '', $
16471647
$parentField = '';
16481648
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
16491649

1650-
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
1651-
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
1652-
$keyList .= ', '.$parentField;
1653-
}
16541650
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
16551651
if (strpos($InfoFieldList[4], 'extra.') !== false) {
16561652
$keyList = 'main.'.$InfoFieldList[2].' as rowid';
16571653
} else {
16581654
$keyList = $InfoFieldList[2].' as rowid';
16591655
}
16601656
}
1657+
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
1658+
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
1659+
$keyList .= ', '.$parentField;
1660+
}
16611661

16621662
$filter_categorie = false;
16631663
if (count($InfoFieldList) > 5) {

0 commit comments

Comments
 (0)