X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=cf_dropdown_option_delete.php;h=404896fa4c16d6611d62962c3d805c4484c30af3;hb=bdc4cdb7f5efbd4b273be6def7652e9011b977a6;hp=8adb43aa9af7b43da96fbefaaafb8028e5b448a7;hpb=5ef582473f6b329be18ad83c61e053fdcd9c6ed5;p=timetracker.git diff --git a/cf_dropdown_option_delete.php b/cf_dropdown_option_delete.php index 8adb43aa..404896fa 100644 --- a/cf_dropdown_option_delete.php +++ b/cf_dropdown_option_delete.php @@ -44,19 +44,18 @@ if ($request->getMethod() == 'POST') { // Determine field id for redirect. $field_id = CustomFields::getFieldIdForOption($cl_id); if ($request->getParameter('btn_delete')) { - // Delete button pressed. - $res = CustomFields::deleteOption($cl_id); + // Delete button pressed. + $res = CustomFields::deleteOption($cl_id); if ($res) { header("Location: cf_dropdown_options.php?field_id=$field_id"); exit(); - } else { + } else $errors->add($i18n->getKey('error.db')); - } } if ($request->getParameter('btn_cancel')) { - // Cancel button pressed. - header("Location: cf_dropdown_options.php?field_id=$field_id"); - exit(); + // Cancel button pressed. + header("Location: cf_dropdown_options.php?field_id=$field_id"); + exit(); } } else { $option = CustomFields::getOptionName($cl_id);