projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed a no longer used function.
[timetracker.git]
/
invoice_send.php
diff --git
a/invoice_send.php
b/invoice_send.php
index
2c0894a
..
ca76f34
100644
(file)
--- a/
invoice_send.php
+++ b/
invoice_send.php
@@
-31,19
+31,24
@@
import('form.Form');
import('ttInvoiceHelper');
import('ttSysConfig');
import('ttInvoiceHelper');
import('ttSysConfig');
-// Access check.
-if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_own_invoices'))
|| !$user->isPluginEnabled('iv')
) {
+// Access check
s
.
+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();
+}
$cl_invoice_id = (int)$request->getParameter('id');
$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'));
if ($request->isPost()) {
$cl_receiver = trim($request->getParameter('receiver'));
@@
-53,7
+58,7
@@
if ($request->isPost()) {
} else {
$cl_receiver = $sc->getValue(SYSC_LAST_INVOICE_EMAIL);
$cl_cc = $sc->getValue(SYSC_LAST_INVOICE_CC);
} 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');
}
$form = new Form('mailForm');