From 829381676d29ab8d0555b0df891e2a4fc7eda111 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Wed, 19 Aug 2026 21:47:25 +0200 Subject: [PATCH] =?UTF-8?q?Manuellen=20Abgleich=20auf=20ausgew=C3=A4hlte?= =?UTF-8?q?=20Verbindung=20begrenzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/tool_registry.inc.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/tool_registry.inc.php b/include/tool_registry.inc.php index b49f033..57549a9 100644 --- a/include/tool_registry.inc.php +++ b/include/tool_registry.inc.php @@ -47,8 +47,18 @@ require_once(BRATONIEN_TOOLS_PATH . 'include/nc_connector_system.inc.php'); function bratonien_tools_nc_connector_run_now() { - $result = bratonien_tools_nc_scheduler_spawn(true); - return array('message'=>(string)($result['message'] ?? 'NC-Abgleich wurde gestartet.')); + $connection_id = isset($_POST['connection_id']) ? (int)$_POST['connection_id'] : 0; + if ($connection_id < 1) + { + throw new RuntimeException('Für den manuellen Abgleich wurde keine Verbindung ausgewählt.'); + } + $connection = bratonien_tools_nc_connector_connection($connection_id, false); + if (!$connection) + { + throw new RuntimeException('Die ausgewählte Verbindung existiert nicht.'); + } + $result = bratonien_tools_nc_scheduler_spawn(true, $connection_id); + return array('message'=>(string)($result['message'] ?? ('Abgleich für Verbindung #'.$connection_id.' wurde gestartet.'))); } function bratonien_tools_get_tools()