]> wagnertech.de Git - timetracker.git/blobdiff - invoice_delete.php
Some refactoring of access checks - in progress.
[timetracker.git] / invoice_delete.php
index 29160ba55bd89b26bf8d1645eb099fbfddf48bf3..2bca58ce3c6a930f4c5b6eb55394fb67ed5999a9 100644 (file)
@@ -30,11 +30,15 @@ require_once('initialize.php');
 import('form.Form');
 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();
+}
 
 $cl_invoice_id = (int)$request->getParameter('id');
 $invoice = ttInvoiceHelper::getInvoice($cl_invoice_id);