X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=mobile%2Fclient_edit.php;h=093e9668c33c6f5c71b6c4300d0932d23ee8b594;hb=c83e33b75d24c71b29df94a061e79a3079f7fe12;hp=e4bc9b22b1fcda08a6ba5cf8b005b2981d9373cc;hpb=a62e4bdd1bc89ea4f3cf29507399b5b8f229597a;p=timetracker.git diff --git a/mobile/client_edit.php b/mobile/client_edit.php index e4bc9b22..093e9668 100644 --- a/mobile/client_edit.php +++ b/mobile/client_edit.php @@ -31,15 +31,19 @@ import('form.Form'); import('ttClientHelper'); import('ttTeamHelper'); -// Access check. -if (!ttAccessAllowed('manage_clients') || !$user->isPluginEnabled('cl')) { +// Access checks. +if (!ttAccessAllowed('manage_clients')) { header('Location: access_denied.php'); exit(); } +if (!$user->isPluginEnabled('cl')) { + header('Location: feature_disabled.php'); + exit(); +} $cl_id = (int) $request->getParameter('id'); -$projects = ttTeamHelper::getActiveProjects($user->team_id); +$projects = ttTeamHelper::getActiveProjects($user->group_id); if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); @@ -100,7 +104,7 @@ if ($request->isPost()) { if ($request->getParameter('btn_copy')) { if (!ttClientHelper::getClientByName($cl_name)) { if (ttClientHelper::insert(array( - 'team_id' => $user->team_id, + 'group_id' => $user->group_id, 'name' => $cl_name, 'address' => $cl_address, 'tax' => $cl_tax,