X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=cf_custom_field_delete.php;h=86fa7d87100be6f8cec838418bca37d4d16aca50;hb=5305983d1ea26da9859eb1d4b54cb9a334c4ca6b;hp=139253d485ba7cfee08b5af2505a99ea3c24b9f3;hpb=437925de08860894e489db00c1d2d967c18267a2;p=timetracker.git diff --git a/cf_custom_field_delete.php b/cf_custom_field_delete.php index 139253d4..86fa7d87 100644 --- a/cf_custom_field_delete.php +++ b/cf_custom_field_delete.php @@ -40,7 +40,7 @@ $id = $request->getParameter('id'); $form = new Form('fieldDeleteForm'); -if ($request->getMethod() == 'POST') { +if ($request->isPost()) { if ($request->getParameter('btn_delete')) { // Delete button pressed. $res = CustomFields::deleteField($id); @@ -48,7 +48,7 @@ if ($request->getMethod() == 'POST') { header('Location: cf_custom_fields.php'); exit(); } else - $errors->add($i18n->getKey('error.db')); + $err->add($i18n->getKey('error.db')); } if ($request->getParameter('btn_cancel')) { // Cancel button pressed. @@ -58,9 +58,9 @@ if ($request->getMethod() == 'POST') { } else { $field = CustomFields::getField($id); if (false === $field) - $errors->add($i18n->getKey('error.db')); + $err->add($i18n->getKey('error.db')); - if ($errors->no()) { + if ($err->no()) { $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$id)); $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete'))); $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel')));