You are here

function diff_update_7300 in Diff 7.3

Updates the existing system variables to target the entity type and bundle.

File

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

Code

function diff_update_7300() {
  $node_types = array_keys(node_type_get_types());
  foreach ($node_types as $bundle) {
    $type_variables = array(
      'show_preview_changes',
      'enable_revisions_page',
      'show_diff_inline',
    );
    foreach ($type_variables as $prefix) {
      $setting = variable_get($prefix . '_' . $bundle, NULL);
      if (isset($setting)) {
        variable_del($prefix . '_' . $bundle);
        variable_set('diff_' . $prefix . '_node_' . $bundle, $setting);
      }
    }
  }
}