X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoice_delete.php;h=ffdcf2c17cf134c6a2fd8e241d28101806daecc4;hb=aeb30899d6ec142220d83b34fd8f6c68c05e8e90;hp=29160ba55bd89b26bf8d1645eb099fbfddf48bf3;hpb=a62e4bdd1bc89ea4f3cf29507399b5b8f229597a;p=timetracker.git diff --git a/invoice_delete.php b/invoice_delete.php index 29160ba5..ffdcf2c1 100644 --- a/invoice_delete.php +++ b/invoice_delete.php @@ -30,14 +30,23 @@ 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); +if (!$invoice) { + header('Location: access_denied.php'); + exit(); +} +// End of access checks. + $invoice_to_delete = $invoice['name']; $form = new Form('invoiceDeleteForm');