From 4fb9d8e4724ccad7ca035313c5d7482f80535e1d Mon Sep 17 00:00:00 2001 From: data Date: Thu, 26 Feb 2026 12:24:28 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20Hutschienen/Feld-Position=20wird=20beim?= =?UTF-8?q?=20Bearbeiten=20nicht=20mehr=20zur=C3=BCckgesetzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GETPOSTINT('position') gab 0 zurück wenn kein position-Parameter gesendet wurde, was die Reihenfolge der Hutschienen zerstörte. Jetzt wird position nur noch überschrieben wenn GETPOSTISSET() true ist. Co-Authored-By: Claude Opus 4.6 --- ajax/equipment_carrier.php | 5 ++++- ajax/equipment_panel.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ajax/equipment_carrier.php b/ajax/equipment_carrier.php index 14ba690..cb11013 100755 --- a/ajax/equipment_carrier.php +++ b/ajax/equipment_carrier.php @@ -121,7 +121,10 @@ switch ($action) { if ($carrier->fetch($carrierId) > 0) { $carrier->label = GETPOST('label', 'alphanohtml'); $carrier->total_te = GETPOSTINT('total_te') ?: $carrier->total_te; - $carrier->position = GETPOSTINT('position'); + // Position nur überschreiben wenn explizit gesendet (sonst wird sie auf 0 zurückgesetzt) + if (GETPOSTISSET('position')) { + $carrier->position = GETPOSTINT('position'); + } // Allow changing panel (0 or empty = no panel) $newPanelId = GETPOSTINT('panel_id'); $carrier->fk_panel = $newPanelId > 0 ? $newPanelId : null; diff --git a/ajax/equipment_panel.php b/ajax/equipment_panel.php index acde20a..9d905de 100755 --- a/ajax/equipment_panel.php +++ b/ajax/equipment_panel.php @@ -101,7 +101,10 @@ switch ($action) { } if ($panel->fetch($panelId) > 0) { $panel->label = GETPOST('label', 'alphanohtml') ?: $panel->label; - $panel->position = GETPOSTINT('position') ?: $panel->position; + // Position nur überschreiben wenn explizit gesendet + if (GETPOSTISSET('position')) { + $panel->position = GETPOSTINT('position'); + } $panel->note_private = GETPOST('note_private', 'restricthtml'); $result = $panel->update($user);