X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/fd0872d9e582113346fa1e93557f370286c5c9f2..7051fc8c0f68618bbaff5f8bb48d3478ce93836a:/week_view.php diff --git a/week_view.php b/week_view.php index b273d278..9f809af3 100644 --- a/week_view.php +++ b/week_view.php @@ -28,13 +28,16 @@ require_once('initialize.php'); import('form.Form'); -import('ttTeamHelper'); -// Access check. -if (!ttAccessAllowed('manage_advanced_settings') || !$user->isPluginEnabled('wv')) { +// Access checks. +if (!ttAccessAllowed('manage_advanced_settings')) { header('Location: access_denied.php'); exit(); } +if (!$user->isPluginEnabled('wv')) { + header('Location: feature_disabled.php'); + exit(); +} if ($request->isPost()) { $cl_week_note = $request->getParameter('week_note'); @@ -55,9 +58,9 @@ $form->addInput(array('type'=>'checkbox','name'=>'notes','value'=>$cl_notes)); $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); if ($request->isPost()){ - if (!ttTeamHelper::enablePlugin('wvn', $cl_week_note) || - !ttTeamHelper::enablePlugin('wvl', $cl_week_list) || - !ttTeamHelper::enablePlugin('wvns', $cl_notes)) { + if (!$user->enablePlugin('wvn', $cl_week_note) || + !$user->enablePlugin('wvl', $cl_week_list) || + !$user->enablePlugin('wvns', $cl_notes)) { $err->add($i18n->get('error.db')); } }