projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed MULTITEAM_MODE to MULTIORG_MODE to better reflect the meaning of the constant.
[timetracker.git]
/
client_edit.php
diff --git
a/client_edit.php
b/client_edit.php
index
a1f9824
..
7b572ea
100644
(file)
--- a/
client_edit.php
+++ b/
client_edit.php
@@
-41,8
+41,13
@@
if (!$user->isPluginEnabled('cl')) {
header('Location: feature_disabled.php');
exit();
}
header('Location: feature_disabled.php');
exit();
}
-
-$cl_id = (int) $request->getParameter('id');
+$cl_id = (int)$request->getParameter('id');
+$client = ttClientHelper::getClient($cl_id, true);
+if (!$client) {
+ header('Location: access_denied.php');
+ exit();
+}
+// End of access checks.
$projects = ttGroupHelper::getActiveProjects();
$projects = ttGroupHelper::getActiveProjects();
@@
-53,7
+58,6
@@
if ($request->isPost()) {
$cl_status = $request->getParameter('status');
$cl_projects = $request->getParameter('projects');
} else {
$cl_status = $request->getParameter('status');
$cl_projects = $request->getParameter('projects');
} else {
- $client = ttClientHelper::getClient($cl_id, true);
$cl_name = $client['name'];
$cl_address = $client['address'];
$cl_tax = $client['tax'];
$cl_name = $client['name'];
$cl_address = $client['address'];
$cl_tax = $client['tax'];