Commit abb54832 authored by Carsten  Rose's avatar Carsten Rose
Browse files

#3533 / afterSave: sqlUpdate auf child-record ändert xId von Hauptrecord auf 0

After 'sqlUpdate' a 'sqlDelete' have been always fired, even it was empty. After firing 'sqlDelete' the current 'slaveId' has been set to '0'. Thad 'id' has been written to the primary record. Now, 'sqlDelete' will be only fired if there is a sqlDelete is given and non empty.
parent 8912153a
...@@ -297,7 +297,7 @@ class FormAction { ...@@ -297,7 +297,7 @@ class FormAction {
$doInsert = ($slaveId == 0); $doInsert = ($slaveId == 0);
$doUpdate = ($slaveId != 0); $doUpdate = ($slaveId != 0);
$doDelete = ($slaveId != 0); $doDelete = ($slaveId != 0) && $fe[FE_SQL_DELETE] != '';
$flagHonor = isset($fe[FE_SQL_HONOR_FORM_ELEMENTS]) && $fe[FE_SQL_HONOR_FORM_ELEMENTS] != ''; $flagHonor = isset($fe[FE_SQL_HONOR_FORM_ELEMENTS]) && $fe[FE_SQL_HONOR_FORM_ELEMENTS] != '';
if ($flagHonor) { if ($flagHonor) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment