X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=time_edit.php;h=cc3070c79dd4d9061f860888dc07fc4068d8d3a0;hb=1fad211ab12fc66117094e33425f8414fccd2cfa;hp=d362709e5b5e24e61ddc615bc90d077a3f5fa74c;hpb=0422997f99a43220229bb0fae82ce64c6bfcd7a2;p=timetracker.git diff --git a/time_edit.php b/time_edit.php index d362709e..cc3070c7 100644 --- a/time_edit.php +++ b/time_edit.php @@ -276,12 +276,12 @@ if ($request->getMethod() == 'POST') { // 3) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists. // Now, step by step. - if ($errors->isEmpty()) { + if ($errors->no()) { // 1) Prohibit saving locked time entries in any form. if($lockdate && $item_date->before($lockdate)) $errors->add($i18n->getKey('error.period_locked')); // 2) Prohibit saving completed unlocked entries into locked interval. - if($errors->isEmpty() && $lockdate && $new_date->before($lockdate)) + if($errors->no() && $lockdate && $new_date->before($lockdate)) $errors->add($i18n->getKey('error.period_locked')); // 3) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists. $uncompleted = ($cl_finish == '' && $cl_duration == ''); @@ -295,13 +295,13 @@ if ($request->getMethod() == 'POST') { } // Prohibit creating an overlapping record. - if ($errors->isEmpty()) { + if ($errors->no()) { if (ttTimeHelper::overlaps($user->getActiveUser(), $new_date->toString(DB_DATEFORMAT), $cl_start, $cl_finish, $cl_id)) $errors->add($i18n->getKey('error.overlap')); } // Now, an update. - if ($errors->isEmpty()) { + if ($errors->no()) { $res = ttTimeHelper::update(array( 'id'=>$cl_id, 'date'=>$new_date->toString(DB_DATEFORMAT), @@ -337,7 +337,7 @@ if ($request->getMethod() == 'POST') { // 2) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists. // Now, step by step. - if ($errors->isEmpty()) { + if ($errors->no()) { // 1) Prohibit saving into locked interval. if($lockdate && $new_date->before($lockdate)) $errors->add($i18n->getKey('error.period_locked')); @@ -353,13 +353,13 @@ if ($request->getMethod() == 'POST') { } // Prohibit creating an overlapping record. - if ($errors->isEmpty()) { + if ($errors->no()) { if (ttTimeHelper::overlaps($user->getActiveUser(), $new_date->toString(DB_DATEFORMAT), $cl_start, $cl_finish)) $errors->add($i18n->getKey('error.overlap')); } // Now, a new insert. - if ($errors->isEmpty()) { + if ($errors->no()) { $id = ttTimeHelper::insert(array( 'date'=>$new_date->toString(DB_DATEFORMAT),