X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoice_add.php;h=61568e2aa32185fd08cfaa6b7966b96a06219b15;hb=7797eda9fb04c217a813db88e00bb9ee541eabbb;hp=ed0a8c52637f1578a0c9e100f5554e5a92d9ee1b;hpb=a62e4bdd1bc89ea4f3cf29507399b5b8f229597a;p=timetracker.git diff --git a/invoice_add.php b/invoice_add.php index ed0a8c52..61568e2a 100644 --- a/invoice_add.php +++ b/invoice_add.php @@ -31,11 +31,16 @@ import('form.Form'); import('ttTeamHelper'); import('ttInvoiceHelper'); -// Access check. -if (!ttAccessAllowed('manage_invoices') || !$user->isPluginEnabled('iv')) { +// Access checks. +if (!ttAccessAllowed('manage_invoices')) { header('Location: access_denied.php'); exit(); } +if (!$user->isPluginEnabled('iv')) { + header('Location: feature_disabled.php'); + exit(); +} +// End of access checks. if ($request->isPost()) { $cl_date = $request->getParameter('date'); @@ -51,12 +56,12 @@ $form->addInput(array('type'=>'datefield','name'=>'date','size'=>'20','value'=>$ // Dropdown for clients if the clients plugin is enabled. if ($user->isPluginEnabled('cl')) { - $clients = ttTeamHelper::getActiveClients($user->team_id); + $clients = ttTeamHelper::getActiveClients($user->group_id); $form->addInput(array('type'=>'combobox','name'=>'client','style'=>'width: 250px;','data'=>$clients,'datakeys'=>array('id','name'),'value'=>$cl_client,'empty'=>array(''=>$i18n->get('dropdown.select')))); } // Dropdown for projects. if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) { - $projects = ttTeamHelper::getActiveProjects($user->team_id); + $projects = ttTeamHelper::getActiveProjects($user->group_id); $form->addInput(array('type'=>'combobox','name'=>'project','style'=>'width: 250px;','data'=>$projects,'datakeys'=>array('id','name'),'value'=>$cl_project,'empty'=>array(''=>$i18n->get('dropdown.all')))); } $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'number','style'=>'width: 250px;','value'=>$cl_number));