]> wagnertech.de Git - timetracker.git/blobdiff - predefined_expense_edit.php
Fixed export-import to include group descriptions.
[timetracker.git] / predefined_expense_edit.php
index 220778a980ea5aecfdcce67eefb093d330adc6dc..ab2299c0a14abf63b2fc5af9ddcf5526750d9ee6 100644 (file)
@@ -30,11 +30,15 @@ require_once('initialize.php');
 import('form.Form');
 import('ttPredefinedExpenseHelper');
 
-// Access check.
-if (!ttAccessAllowed('manage_advanced_settings') || !$user->isPluginEnabled('ex')) {
+// Access checks.
+if (!ttAccessAllowed('manage_advanced_settings')) {
   header('Location: access_denied.php');
   exit();
 }
+if (!$user->isPluginEnabled('ex')) {
+  header('Location: feature_disabled.php');
+  exit();
+}
 
 $predefined_expense_id = (int) $request->getParameter('id');
 
@@ -60,7 +64,6 @@ if ($request->isPost()) {
   if ($err->no()) {
     if (ttPredefinedExpenseHelper::update(array(
         'id' => $predefined_expense_id,
-        'team_id' => $user->team_id,
         'name' => $cl_name,
         'cost' => $cl_cost))) {
         header('Location: predefined_expenses.php');