X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=client_edit.php;h=74062d06eaf630bb473281bcf53fd4aa90b20da2;hb=54c7f39c93815e99c45f3f974a4ec14673fee1b2;hp=05203237f9a5bb0bcc794fc25aa008bd3f97dc96;hpb=a0dd058ab6007cfc6a72713215a7f4abb96f1b45;p=timetracker.git diff --git a/client_edit.php b/client_edit.php index 05203237..74062d06 100644 --- a/client_edit.php +++ b/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')); @@ -99,7 +103,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,