X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoice_send.php;h=ca76f34bbe8cd615830cf56e968cf475d7835231;hb=1c55e1b9d6da2173f7e946011908c02dd80df26d;hp=f0e30bc4bfe83958571e5d54fb5797632a069999;hpb=4dcb88a76a3de466ee6116ae0852f53ba2b259a5;p=timetracker.git diff --git a/invoice_send.php b/invoice_send.php index f0e30bc4..ca76f34b 100644 --- a/invoice_send.php +++ b/invoice_send.php @@ -40,14 +40,15 @@ if (!$user->isPluginEnabled('iv')) { header('Location: feature_disabled.php'); exit(); } - $cl_invoice_id = (int)$request->getParameter('id'); -$invoice = ttInvoiceHelper::getInvoice($cl_invoice_id); -$sc = new ttSysConfig($user->id); +$invoice = ttInvoiceHelper::getInvoice($cl_invoice_id); +if (!$invoice) { + header('Location: access_denied.php'); + exit(); +} +// End of access checks. -// Security check. -if (!$cl_invoice_id || !$invoice) - die ($i18n->get('error.sys')); +$sc = new ttSysConfig($user->id); if ($request->isPost()) { $cl_receiver = trim($request->getParameter('receiver')); @@ -57,7 +58,7 @@ if ($request->isPost()) { } else { $cl_receiver = $sc->getValue(SYSC_LAST_INVOICE_EMAIL); $cl_cc = $sc->getValue(SYSC_LAST_INVOICE_CC); - $cl_subject = $i18n->get('title.invoice').' '.$invoice['name'].', '.$user->team; + $cl_subject = $i18n->get('title.invoice').' '.$invoice['name'].', '.$user->group; } $form = new Form('mailForm');