X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=predefined_expenses.php;h=88ac44d70a4930cdaed7bbf99e2f0f7b7c868a55;hb=b027028b5322fcbfb6de53e7a74529cbac7931de;hp=9db98e0ea8d1a1040dad1fff127255ece0e2b4e5;hpb=b401022733a9645ed701522585b2d57db936f5cc;p=timetracker.git diff --git a/predefined_expenses.php b/predefined_expenses.php index 9db98e0e..88ac44d7 100644 --- a/predefined_expenses.php +++ b/predefined_expenses.php @@ -30,11 +30,15 @@ require_once('initialize.php'); import('form.Form'); import('ttTeamHelper'); -// 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(); +} $form = new Form('predefinedExpensesForm'); @@ -45,12 +49,12 @@ if ($request->isPost()) { exit(); } } else { - $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->getKey('button.add'))); - $predefinedExpenses = ttTeamHelper::getPredefinedExpenses($user->team_id); + $form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add'))); + $predefinedExpenses = ttTeamHelper::getPredefinedExpenses($user->group_id); } $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('predefined_expenses', $predefinedExpenses); -$smarty->assign('title', $i18n->getKey('title.predefined_expenses')); +$smarty->assign('title', $i18n->get('title.predefined_expenses')); $smarty->assign('content_page_name', 'predefined_expenses.tpl'); $smarty->display('index.tpl');