X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/3705caa8680d82736ab1a1d21e8829bed1226341..a7ba11adfecf6cb906749efe5abce688363aef07:/mobile/timer.php diff --git a/mobile/timer.php b/mobile/timer.php index fa00ced2..99a88526 100644 --- a/mobile/timer.php +++ b/mobile/timer.php @@ -65,7 +65,7 @@ $cl_cf_1 = trim($request->getParameter('cf_1', ($request->getMethod()=='POST'? n $_SESSION['cf_1'] = $cl_cf_1; $cl_billable = 1; if (in_array('iv', explode(',', $user->plugins))) { - if ($request->getMethod() == 'POST') { + if ($request->isPost()) { $cl_billable = $request->getParameter('billable'); $_SESSION['billable'] = (int) $cl_billable; } else @@ -188,7 +188,7 @@ if ($lock_interval > 0) { } // Submit. -if ($request->getMethod() == 'POST') { +if ($request->isPost()) { if ($request->getParameter('btn_start')) { // Start button clicked. We need to create a new uncompleted record with only the start time. $cl_finish = null; @@ -219,17 +219,17 @@ if ($request->getMethod() == 'POST') { $errors->add($i18n->getKey('error.period_locked')); // Prohibit creating another uncompleted record. - if ($errors->isEmpty() && $uncompleted) { + if ($errors->no() && $uncompleted) { $errors->add($i18n->getKey('error.uncompleted_exists')." ".$i18n->getKey('error.goto_uncompleted').""); } // Prohibit creating an overlapping record. - if ($errors->isEmpty()) { + if ($errors->no()) { if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish)) $errors->add($i18n->getKey('error.overlap')); } - if ($errors->isEmpty()) { + if ($errors->no()) { $id = ttTimeHelper::insert(array( 'date' => $cl_date, 'user_id' => $user->getActiveUser(),