Direktverbindung fuer unverbundene Ports zum Patchfeld anbieten

closes #25
This commit is contained in:
2026-02-19 11:09:36 +01:00
parent dbe977f62c
commit 96f885efde
3 changed files with 41 additions and 2 deletions

View File

@@ -39,6 +39,18 @@ $portBType = $normalizePortType((string)($connection['port_b_type'] ?? 'device')
$portAId = (int)($connection['port_a_id'] ?? 0);
$portBId = (int)($connection['port_b_id'] ?? 0);
if ($connectionId <= 0) {
$requestedPortAType = $normalizePortType((string)($_GET['port_a_type'] ?? $portAType));
$requestedPortBType = $normalizePortType((string)($_GET['port_b_type'] ?? $portBType));
$requestedPortAId = (int)($_GET['port_a_id'] ?? $portAId);
$requestedPortBId = (int)($_GET['port_b_id'] ?? $portBId);
$portAType = $requestedPortAType;
$portBType = $requestedPortBType;
$portAId = $requestedPortAId > 0 ? $requestedPortAId : 0;
$portBId = $requestedPortBId > 0 ? $requestedPortBId : 0;
}
$endpointOptions = [
'device' => [],
'module' => [],