function node_update_8001

Rename node type language variable names.

See also

http://drupal.org/node/540294

Related topics

File

drupal/core/modules/node/node.install, line 580
Install, update and uninstall functions for the node module.

Code

function node_update_8001() {
  $types = db_query('SELECT type FROM {node_type}')
    ->fetchCol();
  foreach ($types as $type) {
    $node_type_language = update_variable_get('language_content_type_' . $type);
    if (isset($node_type_language)) {
      update_variable_set('node_type_language_' . $type, $node_type_language);
    }
    update_variable_del('language_content_type_' . $type);
  }
}