// 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.
$errors->add($i18n->getKey('error.period_locked'));
}
- if ($errors->isEmpty()) {
+ if ($errors->no()) {
// Delete the record.
$result = ttTimeHelper::delete($cl_id, $user->getActiveUser());