X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/3705caa8680d82736ab1a1d21e8829bed1226341..a7ba11adfecf6cb906749efe5abce688363aef07:/mobile/time_delete.php diff --git a/mobile/time_delete.php b/mobile/time_delete.php index be9d498c..16833025 100644 --- a/mobile/time_delete.php +++ b/mobile/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. @@ -73,7 +73,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());