X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=week_view.php;h=9f809af3cf7d151bb7a4539cb75e7fccb7379d55;hb=54d64e3d8f517e65577aa47fb6e38114e42f4970;hp=99dc2eee949f223862aedbddfd22f66eb92f2cb7;hpb=b401022733a9645ed701522585b2d57db936f5cc;p=timetracker.git diff --git a/week_view.php b/week_view.php index 99dc2eee..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'); @@ -52,17 +55,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');