X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=cf_dropdown_option_add.php;h=de598186e29f5b7a7e69b6430f055bec4fa294bb;hb=e60b2b28114cc788d3d4cb2108de859b14559c29;hp=b9500833d31679ff85a6b713386e96e1111a2f88;hpb=a0dd058ab6007cfc6a72713215a7f4abb96f1b45;p=timetracker.git diff --git a/cf_dropdown_option_add.php b/cf_dropdown_option_add.php index b9500833..de598186 100644 --- a/cf_dropdown_option_add.php +++ b/cf_dropdown_option_add.php @@ -30,16 +30,22 @@ require_once('initialize.php'); require_once('plugins/CustomFields.class.php'); import('form.Form'); -// Access check. -if (!ttAccessAllowed('manage_custom_fields') || !$user->isPluginEnabled('cf')) { +// Access checks. +if (!ttAccessAllowed('manage_custom_fields')) { header('Location: access_denied.php'); exit(); } - -$cl_field_id = $request->getParameter('field_id'); +if (!$user->isPluginEnabled('cf')) { + header('Location: feature_disabled.php'); + exit(); +} +$cl_field_id = (int)$request->getParameter('field_id'); $field = CustomFields::getField($cl_field_id); -if (false === $field) - $err->add($i18n->get('error.db')); +if (!$field) { + header('Location: access_denied.php'); + exit(); +} +// End of access checks. $form = new Form('optionAddForm'); if ($err->no()) {