X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=cf_custom_field_delete.php;h=4e17cd03489300fc035bf3ccbdb077256666f412;hb=bdc4cdb7f5efbd4b273be6def7652e9011b977a6;hp=7ae62ac40fd9cc9817d4a340e604dfba8aef53bc;hpb=5ef582473f6b329be18ad83c61e053fdcd9c6ed5;p=timetracker.git diff --git a/cf_custom_field_delete.php b/cf_custom_field_delete.php index 7ae62ac4..4e17cd03 100644 --- a/cf_custom_field_delete.php +++ b/cf_custom_field_delete.php @@ -41,20 +41,19 @@ $id = $request->getParameter('id'); $form = new Form('fieldDeleteForm'); if ($request->getMethod() == 'POST') { - if ($request->getParameter('btn_delete')) { - // Delete button pressed. - $res = CustomFields::deleteField($id); + if ($request->getParameter('btn_delete')) { + // Delete button pressed. + $res = CustomFields::deleteField($id); if ($res) { header('Location: cf_custom_fields.php'); exit(); - } else { + } else $errors->add($i18n->getKey('error.db')); - } } if ($request->getParameter('btn_cancel')) { - // Cancel button pressed. - header('Location: cf_custom_fields.php'); - exit(); + // Cancel button pressed. + header('Location: cf_custom_fields.php'); + exit(); } } else { $field = CustomFields::getField($id);