Commit d42b5711 authored by Carsten  Rose's avatar Carsten Rose
Browse files

AbtractBuildForm.php: fix problem with subrecords in MultiDB Environment.

parent 06af44fb
Pipeline #862 passed with stage
in 1 minute and 39 seconds
......@@ -2464,6 +2464,7 @@ abstract class AbstractBuildForm {
$hasDragAndDrop = false;
$orderColumn = $formElement[FE_ORDER_COLUMN] ?? DND_COLUMN_ORD;
$dndTable = '';
if (isset($formElement[FE_DND_TABLE])) {
// Table is specified in parameter field
$dndTable = $formElement[FE_DND_TABLE];
......@@ -2474,8 +2475,9 @@ abstract class AbstractBuildForm {
ROW_REGULAR, [$formName]);
if (count($form) > 0) { $dndTable = $form[0][F_TABLE_NAME]; }
}
if ($dndTable) {
$columns = $this->dbArray[$this->dbIndexQfq]->sql("SHOW COLUMNS FROM $dndTable");
$columns = $this->dbArray[$this->dbIndexData]->sql("SHOW COLUMNS FROM $dndTable");
foreach ($columns as $column) {
if ($column['Field'] === $orderColumn) {
// DragAndDrop is active if the dndTable has the orderColumn
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment