]> wagnertech.de Git - timetracker.git/blobdiff - mobile/time_delete.php
Added custom field output on time.php as a rewrite of PR#76."
[timetracker.git] / mobile / time_delete.php
index 8ebb98a88f1f9b2a2b454efac6220fced2efb4e2..a68da767a861e82fd48a9bfb6420f0bf51c59773 100644 (file)
@@ -38,10 +38,9 @@ if (!ttAccessAllowed('track_own_time')) {
   exit();
 }
 $cl_id = (int)$request->getParameter('id');
-$user_id = $user->getUser();
-$time_rec = ttTimeHelper::getRecord($cl_id, $user_id);
-if (!$time_rec || $time_rec['timesheet_id'] || $time_rec['invoice_id']) {
-  // Prohibit deleting not ours, or assigned to timesheet, or invoiced records.
+$time_rec = ttTimeHelper::getRecord($cl_id);
+if (!$time_rec || $time_rec['approved'] || $time_rec['timesheet_id'] || $time_rec['invoice_id']) {
+  // Prohibit deleting not ours, approved, assigned to timesheet, or invoiced records.
   header('Location: access_denied.php');
   exit();
 }