projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A bit more refactoring.
[timetracker.git]
/
mobile
/
task_delete.php
diff --git
a/mobile/task_delete.php
b/mobile/task_delete.php
index
df3c964
..
153f3a2
100644
(file)
--- a/
mobile/task_delete.php
+++ b/
mobile/task_delete.php
@@
-30,14
+30,23
@@
require_once('../initialize.php');
import('ttTaskHelper');
import('form.Form');
import('ttTaskHelper');
import('form.Form');
-// Access check.
-if (!ttAccessAllowed('manage_tasks')
|| MODE_PROJECTS_AND_TASKS != $user->tracking_mode
) {
+// Access check
s
.
+if (!ttAccessAllowed('manage_tasks')) {
header('Location: access_denied.php');
exit();
}
header('Location: access_denied.php');
exit();
}
-
+if (MODE_PROJECTS_AND_TASKS != $user->tracking_mode) {
+ header('Location: feature_disabled.php');
+ exit();
+}
$cl_task_id = (int)$request->getParameter('id');
$task = ttTaskHelper::get($cl_task_id);
$cl_task_id = (int)$request->getParameter('id');
$task = ttTaskHelper::get($cl_task_id);
+if (!$task) {
+ header('Location: access_denied.php');
+ exit();
+}
+// End of access checks.
+
$task_to_delete = $task['name'];
$form = new Form('taskDeleteForm');
$task_to_delete = $task['name'];
$form = new Form('taskDeleteForm');