X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/c2422b1c289617775ca58ba490586e81864044cd..b5d95bbf6e8ce2b60c6640cdee5571025524e1a6:/cf_dropdown_option_delete.php 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);