X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=week_view.php;h=0d369bf9bbcd7b7a9db0e7116d8ff5007ca10e0a;hb=817c14c6c2098d85ef912fb95898c857bf533b4f;hp=7c722da02247dc93fd61d7194c17f446eb663130;hpb=c017d38a91f026433bea5210840f1a5b2e458125;p=timetracker.git diff --git a/week_view.php b/week_view.php index 7c722da0..0d369bf9 100644 --- a/week_view.php +++ b/week_view.php @@ -28,10 +28,9 @@ require_once('initialize.php'); import('form.Form'); -import('ttTeamHelper'); -// Access check. -if (!ttAccessCheck(right_manage_team) || !$user->isPluginEnabled('wv')) { +// Access checks. +if (!ttAccessAllowed('manage_advanced_settings')) { header('Location: access_denied.php'); exit(); } @@ -52,17 +51,17 @@ $form = new Form('weekViewForm'); $form->addInput(array('type'=>'checkbox','name'=>'week_note','value'=>$cl_week_note)); $form->addInput(array('type'=>'checkbox','name'=>'week_list','value'=>$cl_week_list)); $form->addInput(array('type'=>'checkbox','name'=>'notes','value'=>$cl_notes)); -$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); +$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)) { - $err->add($i18n->getKey('error.db')); + if (!$user->enablePlugin('wvn', $cl_week_note) || + !$user->enablePlugin('wvl', $cl_week_list) || + !$user->enablePlugin('wvns', $cl_notes)) { + $err->add($i18n->get('error.db')); } } $smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('title', $i18n->getKey('title.week_view')); +$smarty->assign('title', $i18n->get('title.week_view')); $smarty->assign('content_page_name', 'week_view.tpl'); $smarty->display('index.tpl');