X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mobile%2Ftimer.php;h=667536324de14442e359a096af24fad8db5ccba7;hb=1078c4da84d79f93ef7f8bbffc5f0c8cb2a1a274;hp=73035a395dbbbd2376466342a614bafae7293989;hpb=38dd91dcf8a9ecf6b7ceb73a9aabf787b96b6f6e;p=timetracker.git diff --git a/mobile/timer.php b/mobile/timer.php index 73035a39..66753632 100644 --- a/mobile/timer.php +++ b/mobile/timer.php @@ -186,7 +186,7 @@ if ($request->isPost()) { $cl_finish = null; // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isPluginEnabled('cm') && !$cl_client) + if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) $err->add($i18n->get('error.client')); if ($custom_fields) { if (!ttValidString($cl_cf_1, !$custom_fields->fields[0]['required'])) $err->add($i18n->get('error.field'), $custom_fields->fields[0]['label']); @@ -254,7 +254,7 @@ if ($request->isPost()) { } if ($request->getParameter('btn_stop')) { // Stop button clicked. We need to finish an uncompleted record in progress. - $record = ttTimeHelper::getRecord($uncompleted['id'], $user->getUser()); + $record = ttTimeHelper::getRecord($uncompleted['id']); // Can we complete this record? if (ttTimeHelper::isValidInterval($record['start'], $cl_finish) // finish time is greater than start time @@ -283,15 +283,15 @@ if ($request->isPost()) { } } // isPost -$week_total = ttTimeHelper::getTimeForWeek($user->getUser(), $cl_date); +$week_total = ttTimeHelper::getTimeForWeek($cl_date); $smarty->assign('week_total', $week_total); $smarty->assign('uncompleted', $uncompleted); -$smarty->assign('time_records', ttTimeHelper::getRecords($user->getUser(), $cl_date)); -$smarty->assign('day_total', ttTimeHelper::getTimeForDay($user->getUser(), $cl_date)); +$smarty->assign('time_records', ttTimeHelper::getRecords($cl_date)); +$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); $smarty->assign('task_list', $task_list);