]> wagnertech.de Git - timetracker.git/blobdiff - invoices.php
Added an environment check for enabled libxml to address issue #67.
[timetracker.git] / invoices.php
index a014472f3920c80b4e1b1d8a2de7c158978dadfd..ba1cad4620bd5f7b90493ef2de4ec803064474f5 100644 (file)
 
 require_once('initialize.php');
 import('form.Form');
 
 require_once('initialize.php');
 import('form.Form');
-import('ttTeamHelper');
+import('ttGroupHelper');
 
 
-// Access check.
-if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) {
+// Access checks.
+if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_own_invoices'))) {
   header('Location: access_denied.php');
   exit();
 }
   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('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');
 $smarty->assign('content_page_name', 'invoices.tpl');
 $smarty->display('index.tpl');