You are here

function newsletter_update_7104 in Newsletter 7

Update entityreference fields with new entityrefence specs.

File

./newsletter.install, line 713
Contains install,uninstall and update functions for Newsletter module.

Code

function newsletter_update_7104(&$sandbox) {
  $fields[] = field_info_field('field_newsletter_list');
  $fields[] = field_info_field('field_newsletter_template');
  foreach ($fields as $field) {
    $field['settings']['handler_submit'] = 'Change handler';
    $field['settings']['handler_settings'] = array(
      'target_bundles' => array(),
      'sort' => array(
        'type' => 'none',
      ),
    );
    field_update_field($field);
  }
}