fix: Hutschienen/Feld-Position wird beim Bearbeiten nicht mehr zurückgesetzt
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 <noreply@anthropic.com>
This commit is contained in:
parent
143ddcb958
commit
4fb9d8e472
2 changed files with 8 additions and 2 deletions
|
|
@ -121,7 +121,10 @@ switch ($action) {
|
||||||
if ($carrier->fetch($carrierId) > 0) {
|
if ($carrier->fetch($carrierId) > 0) {
|
||||||
$carrier->label = GETPOST('label', 'alphanohtml');
|
$carrier->label = GETPOST('label', 'alphanohtml');
|
||||||
$carrier->total_te = GETPOSTINT('total_te') ?: $carrier->total_te;
|
$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)
|
// Allow changing panel (0 or empty = no panel)
|
||||||
$newPanelId = GETPOSTINT('panel_id');
|
$newPanelId = GETPOSTINT('panel_id');
|
||||||
$carrier->fk_panel = $newPanelId > 0 ? $newPanelId : null;
|
$carrier->fk_panel = $newPanelId > 0 ? $newPanelId : null;
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,10 @@ switch ($action) {
|
||||||
}
|
}
|
||||||
if ($panel->fetch($panelId) > 0) {
|
if ($panel->fetch($panelId) > 0) {
|
||||||
$panel->label = GETPOST('label', 'alphanohtml') ?: $panel->label;
|
$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');
|
$panel->note_private = GETPOST('note_private', 'restricthtml');
|
||||||
|
|
||||||
$result = $panel->update($user);
|
$result = $panel->update($user);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue