X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/030d2c3ffbf8229cc945427e9e9f7704226effe1..ed499fa49d8dad66119752b4cfe213d30da2bed6:/quotas.php diff --git a/quotas.php b/quotas.php index c921fba4..1f376190 100644 --- a/quotas.php +++ b/quotas.php @@ -29,7 +29,6 @@ require_once('initialize.php'); require_once('plugins/MonthlyQuota.class.php'); import('form.Form'); -import('ttTeamHelper'); import('ttTimeHelper'); // Access checks. @@ -89,8 +88,8 @@ if ($request->isPost()){ // Handle workday hours. $workday_minutes = ttTimeHelper::postedDurationToMinutes($request->getParameter('workdayHours')); - if ($workday_minutes != $user->workday_minutes) { - if (!ttTeamHelper::update($user->team_id, array('name'=>$user->team,'workday_minutes'=>$workday_minutes))) + if ($workday_minutes != $user->getWorkdayMinutes()) { + if (!$user->updateGroup(array('workday_minutes'=>$workday_minutes))) $err->add($i18n->get('error.db')); } @@ -112,7 +111,7 @@ if ($request->isPost()){ // Get monthly quotas for the entire year. $monthsData = $quota->get($selectedYear); -$workdayHours = ttTimeHelper::toAbsDuration($user->workday_minutes, true); +$workdayHours = ttTimeHelper::toAbsDuration($user->getWorkdayMinutes(), true); $form = new Form('monthlyQuotasForm'); $form->addInput(array('type'=>'text', 'name'=>'workdayHours', 'value'=>$workdayHours, 'style'=>'width:60px'));