You are here

function diff_update_7304 in Diff 7.3

Removes unused variable settings and merges inline diff block settings.

File

./diff.install, line 88
Provides uninstallation functions.

Code

function diff_update_7304() {

  // This is now always applied to text fields.
  variable_del('diff_normalise_text');

  // Merge the content type settings for the inline diff block into a single
  // variable.
  $node_types = array_keys(node_type_get_types());
  $enabled_types = array();
  foreach ($node_types as $node_type) {
    if (variable_get('diff_show_diff_inline_node_' . $node_type, FALSE)) {
      $enabled_types[$node_type] = $node_type;
    }
    variable_del('diff_show_diff_inline_node_' . $node_type);
  }
  variable_set('diff_show_diff_inline_node_bundles', $enabled_types);

  // Warn users that these settings are altered.
  drupal_set_message(t('Diff <em>Inline differences</em> content type settings are now located within the <em>Inline differences</em> block settings.'));
}