]> wagnertech.de Git - timetracker.git/blobdiff - time_delete.php
Siwtched to using isPost() function
[timetracker.git] / time_delete.php
index e07d1d3390f434b1529e62b121a77fbfeb9f6d57..8bbc5971572876a3bcfdba205ba2b012a98d5d2a 100644 (file)
@@ -53,7 +53,7 @@ if ($time_rec['invoice_id']) die($i18n->getKey('error.sys'));
 // Escape comment for presentation.
 $time_rec['comment'] = htmlspecialchars($time_rec['comment']);
 
-if ($request->getMethod() == 'POST') {
+if ($request->isPost()) {
   if ($request->getParameter('delete_button')) { // Delete button pressed.
 
     // Determine if it's okay to delete the record.
@@ -72,7 +72,7 @@ if ($request->getMethod() == 'POST') {
       $errors->add($i18n->getKey('error.period_locked'));
     }
 
-    if ($errors->isEmpty()) {
+    if ($errors->no()) {
 
       // Delete the record.
       $result = ttTimeHelper::delete($cl_id, $user->getActiveUser());