示例#1
0
         exit_permission_denied();
         return;
     }
     $field_id = $request->getValidated('field_id', 'uint', 0);
     $field = $art_field_fact->getFieldFromId($field_id);
     if ($field) {
         $em = EventManager::instance();
         $em->processEvent('tracker_admin_field_delete', array('field' => $field, 'ath' => $ath));
         //clear permissions
         permission_clear_all_fields_tracker($group_id, $atid, $field->getID());
         if (!$field->delete($atid)) {
             exit_error($Language->getText('global', 'error'), $field->getErrorMessage());
         } else {
             require_once 'common/tracker/ArtifactRulesManager.class.php';
             $arm = new ArtifactRulesManager();
             $arm->deleteRulesByFieldId($atid, $field_id);
             // Reload the field factory
             $art_field_fact = new ArtifactFieldFactory($ath);
             // Reload the fieldset factory
             $art_fieldset_fact = new ArtifactFieldSetFactory($ath);
             $GLOBALS['Response']->addFeedback('info', $Language->getText('tracker_admin_index', 'field_deleted'));
         }
     }
     require './field_usage.php';
     break;
 case 'display_field_update':
     if (!user_isloggedin()) {
         exit_not_logged_in();
         return;
     }
     if (!$ath->userIsAdmin()) {