Skip to content

Commit

Permalink
Fix devices transfer (#18509)
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher authored Dec 9, 2024
1 parent 61b7c1e commit 98176e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4181,11 +4181,12 @@ public function showTransferList()
continue;
}
$table = $itemtype::getTable();

$name_field = $item->getNameField();
$table_name_field = sprintf('%1$s.%2$s', $table, $name_field);
$iterator = $DB->request([
'SELECT' => [
"$table.id",
"$table.name",
$table_name_field,
'entities.completename AS locname',
'entities.id AS entID'
],
Expand All @@ -4199,7 +4200,7 @@ public function showTransferList()
]
],
'WHERE' => ["$table.id" => $tab],
'ORDERBY' => ['locname', "$table.name"]
'ORDERBY' => ['locname', $table_name_field]
]);
$entID = -1;

Expand All @@ -4213,7 +4214,7 @@ public function showTransferList()
$entID = $data['entID'];
echo "<span class='b spaced'>" . $data['locname'] . "</span><br>";
}
echo ($data['name'] ? $data['name'] : "(" . $data['id'] . ")") . "<br>";
echo ($data[$name_field] ? $data[$name_field] : "(" . $data['id'] . ")") . "<br>";
}
}
}
Expand Down

0 comments on commit 98176e5

Please sign in to comment.