X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoices.php;h=de51b5366461cbbb7ff9eba7f58a0ad83b29c71e;hb=f504e16303445771d7f069ed49a5a29bbd7ef737;hp=ad0b28533546d5914232f46d507a35dafefe90a4;hpb=5ef582473f6b329be18ad83c61e053fdcd9c6ed5;p=timetracker.git diff --git a/invoices.php b/invoices.php index ad0b2853..de51b536 100644 --- a/invoices.php +++ b/invoices.php @@ -28,17 +28,22 @@ require_once('initialize.php'); import('form.Form'); -import('ttTeamHelper'); +import('ttGroupHelper'); -// Access check. -if (!ttAccessCheck(right_view_invoices)) { +// Access checks. +if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_client_invoices'))) { header('Location: access_denied.php'); exit(); } +if (!$user->isPluginEnabled('iv')) { + header('Location: feature_disabled.php'); + exit(); +} +// End of access checks. -$invoices = ttTeamHelper::getActiveInvoices(); +$invoices = ttGroupHelper::getActiveInvoices(); $smarty->assign('invoices', $invoices); -$smarty->assign('title', $i18n->getKey('title.invoices')); +$smarty->assign('title', $i18n->get('title.invoices')); $smarty->assign('content_page_name', 'invoices.tpl'); $smarty->display('index.tpl');