X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/11bfec0ff88b649a934556e8b4812d65715c7509..fa6508ac21c30d6bfef008387fabd29a843d7b66:/mobile/time_edit.php diff --git a/mobile/time_edit.php b/mobile/time_edit.php index a1a56e37..56d373ff 100644 --- a/mobile/time_edit.php +++ b/mobile/time_edit.php @@ -40,7 +40,7 @@ if (!ttAccessAllowed('track_own_time')) { exit(); } $cl_id = (int)$request->getParameter('id'); -$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser()); +$time_rec = ttTimeHelper::getRecord($cl_id, $user->getUser()); if (!$time_rec || $time_rec['invoice_id']) { // Prohibit editing not ours or invoiced records. header('Location: access_denied.php'); @@ -51,7 +51,7 @@ if (!$time_rec || $time_rec['invoice_id']) { // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { require_once('../plugins/CustomFields.class.php'); - $custom_fields = new CustomFields($user->team_id); + $custom_fields = new CustomFields($user->group_id); $smarty->assign('custom_fields', $custom_fields); } @@ -107,7 +107,7 @@ $form = new Form('timeRecordForm'); // Dropdown for clients in MODE_TIME. Use all active clients. if (MODE_TIME == $user->tracking_mode && $user->isPluginEnabled('cl')) { - $active_clients = ttTeamHelper::getActiveClients($user->team_id, true); + $active_clients = ttTeamHelper::getActiveClients($user->group_id, true); $form->addInput(array('type'=>'combobox', 'onchange'=>'fillProjectDropdown(this.value);', 'name'=>'client', @@ -133,7 +133,7 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->t // Dropdown for clients if the clients plugin is enabled. if ($user->isPluginEnabled('cl')) { - $active_clients = ttTeamHelper::getActiveClients($user->team_id, true); + $active_clients = ttTeamHelper::getActiveClients($user->group_id, true); // We need an array of assigned project ids to do some trimming. foreach($project_list as $project) $projects_assigned_to_user[] = $project['id']; @@ -161,7 +161,7 @@ if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->t } if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { - $task_list = ttTeamHelper::getActiveTasks($user->team_id); + $task_list = ttTeamHelper::getActiveTasks($user->group_id); $form->addInput(array('type'=>'combobox', 'name'=>'task', 'style'=>'width: 250px;', @@ -279,7 +279,7 @@ if ($request->isPost()) { // 3) Prohibit saving uncompleted unlocked entries when another uncompleted entry exists. $uncompleted = ($cl_finish == '' && $cl_duration == ''); if ($uncompleted) { - $not_completed_rec = ttTimeHelper::getUncompleted($user->getActiveUser()); + $not_completed_rec = ttTimeHelper::getUncompleted($user->getUser()); if ($not_completed_rec && ($time_rec['id'] <> $not_completed_rec['id'])) { // We have another not completed record. $err->add($i18n->get('error.uncompleted_exists')." ".$i18n->get('error.goto_uncompleted').""); @@ -289,7 +289,7 @@ if ($request->isPost()) { // Prohibit creating an overlapping record. if ($err->no()) { - if (ttTimeHelper::overlaps($user->getActiveUser(), $new_date->toString(DB_DATEFORMAT), $cl_start, $cl_finish, $cl_id)) + if (ttTimeHelper::overlaps($user->getUser(), $new_date->toString(DB_DATEFORMAT), $cl_start, $cl_finish, $cl_id)) $err->add($i18n->get('error.overlap')); } @@ -298,7 +298,7 @@ if ($request->isPost()) { $res = ttTimeHelper::update(array( 'id'=>$cl_id, 'date'=>$new_date->toString(DB_DATEFORMAT), - 'user_id'=>$user->getActiveUser(), + 'user_id'=>$user->getUser(), 'client'=>$cl_client, 'project'=>$cl_project, 'task'=>$cl_task,