X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=client_add.php;h=3afcbc072aca5b661eaf0d7bb524e8336431c264;hb=47676f16efdde0b36a4ed09d2ab0476584aeb2a6;hp=c0526e51b152bea7927f8a74b8b52d297ab6eba3;hpb=a0dd058ab6007cfc6a72713215a7f4abb96f1b45;p=timetracker.git diff --git a/client_add.php b/client_add.php index c0526e51..3afcbc07 100644 --- a/client_add.php +++ b/client_add.php @@ -31,13 +31,17 @@ 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(); +} -$projects = ttTeamHelper::getActiveProjects($user->team_id); +$projects = ttTeamHelper::getActiveProjects($user->group_id); if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); @@ -67,7 +71,7 @@ if ($request->isPost()) { if ($err->no()) { 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,