X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=quotas.php;h=8e6f59c4d54514314ed95b4c01aa9ce683c33c5f;hb=54c7f39c93815e99c45f3f974a4ec14673fee1b2;hp=19e70e50529fb67a48673a3de3e666aa5081ddda;hpb=fd0872d9e582113346fa1e93557f370286c5c9f2;p=timetracker.git diff --git a/quotas.php b/quotas.php index 19e70e50..8e6f59c4 100644 --- a/quotas.php +++ b/quotas.php @@ -32,11 +32,15 @@ import('form.Form'); import('ttTeamHelper'); import('ttTimeHelper'); -// Access check. -if (!ttAccessAllowed('manage_advanced_settings') || !$user->isPluginEnabled('mq')) { +// Access checks. +if (!ttAccessAllowed('manage_advanced_settings')) { header('Location: access_denied.php'); exit(); } +if (!$user->isPluginEnabled('mq')) { + header('Location: feature_disabled.php'); + exit(); +} // Start and end fallback values for the Year dropdown. $yearStart = 2015; @@ -86,7 +90,7 @@ if ($request->isPost()){ // Handle workday hours. $workday_minutes = ttTimeHelper::postedDurationToMinutes($request->getParameter('workdayHours')); if ($workday_minutes != $user->workday_minutes) { - if (!ttTeamHelper::update($user->team_id, array('name'=>$user->team,'workday_minutes'=>$workday_minutes))) + if (!ttTeamHelper::update($user->group_id, array('name'=>$user->team,'workday_minutes'=>$workday_minutes))) $err->add($i18n->get('error.db')); }