X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/b027832862272283d9203c994ec8fd39f6196887..a7ba11adfecf6cb906749efe5abce688363aef07:/time_delete.php?ds=sidebyside diff --git a/time_delete.php b/time_delete.php index e07d1d33..8bbc5971 100644 --- a/time_delete.php +++ b/time_delete.php @@ -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());