]> wagnertech.de Git - timetracker.git/blobdiff - invoice_delete.php
Siwtched to using isPost() function
[timetracker.git] / invoice_delete.php
index 7ef50f84bd3e6435bde9e1915532c0950c49778f..89f132d4b1efc9dd3983931315aea7e959010534 100644 (file)
@@ -49,12 +49,12 @@ $form->addInput(array('type'=>'combobox',
 $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')));
 
-if ($request->getMethod() == 'POST') {
+if ($request->isPost()) {
   if ($request->getParameter('btn_delete')) {
     if (ttInvoiceHelper::getInvoice($cl_invoice_id)) {
       if (ttInvoiceHelper::delete($cl_invoice_id, $request->getParameter('delete_invoice_entries'))) {
         header('Location: invoices.php');
-       exit();
+        exit();
       } else
         $errors->add($i18n->getKey('error.db'));
     } else
@@ -63,7 +63,7 @@ if ($request->getMethod() == 'POST') {
     header('Location: invoices.php');
     exit();
   }
-} // post
+} // POST
 
 $smarty->assign('invoice_to_delete', $invoice_to_delete);
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));