X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/4dcb88a76a3de466ee6116ae0852f53ba2b259a5..45c855269d952873285f7a835e82fc2b3eff3971:/invoice_view.php diff --git a/invoice_view.php b/invoice_view.php index 62f0cbbf..fd8424a3 100644 --- a/invoice_view.php +++ b/invoice_view.php @@ -41,15 +41,13 @@ if (!$user->isPluginEnabled('iv')) { header('Location: feature_disabled.php'); exit(); } - -$cl_id = (int)$request->getParameter('id'); -$invoice = ttInvoiceHelper::getInvoice($cl_id); -// Temporary fix for invalid invoice id. TODO: implement properly and review security of other pages, -// where item id is passed (or posted) as parameter. +$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_date = new DateAndTime(DB_DATEFORMAT, $invoice['date']); $client = ttClientHelper::getClient($invoice['client_id'], true);