A few more replacements for canManageTeam.
[timetracker.git] / cf_dropdown_options.php
index c8713ca..3ee5294 100644 (file)
@@ -31,7 +31,7 @@ require_once('plugins/CustomFields.class.php');
 import('form.Form');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessAllowed('manage_custom_fields') || !$user->isPluginEnabled('cf')) {
   header('Location: access_denied.php');
   exit();
 }
@@ -39,7 +39,7 @@ if (!ttAccessCheck(right_manage_team)) {
 $field_id = $request->getParameter('field_id');
 $options = CustomFields::getOptions($field_id);
 if (false === $options)
-  $errors->add($i18n->getKey('error.db'));
+  $err->add($i18n->getKey('error.db'));
 
 $form = new Form('dropdownOptionsForm');
 
@@ -49,4 +49,3 @@ $smarty->assign('options', $options);
 $smarty->assign('title', $i18n->getKey('title.cf_dropdown_options'));
 $smarty->assign('content_page_name', 'cf_dropdown_options.tpl');
 $smarty->display('index.tpl');
-?>
\ No newline at end of file