You are here

function commerce_file_update_7104 in Commerce File 7

Unlock Commerce File field on License entities

See also

http://drupal.org/node/1394892

1 call to commerce_file_update_7104()
commerce_file_update_7108 in ./commerce_file.install
Re-run 7104 for Unlock Commerce File field on License entities to fix fresh installs

File

./commerce_file.install, line 323
Install, update and uninstall functions this module.

Code

function commerce_file_update_7104(&$sandbox) {
  field_info_cache_clear();
  drupal_load('module', 'commerce_file');
  $field_name = 'commerce_file_license_file';
  $field = field_info_field($field_name);
  if (!empty($field['locked'])) {
    $field['locked'] = FALSE;
    field_update_field($field);
  }
  return t('Unlocked Commerce File field on License entities');
}