Some more refactoring in notification config.
[timetracker.git] / predefined_expense_edit.php
index 220778a..ab2299c 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');