You are here

function i18n_variable_update_7003 in Internationalization 7

Update list of realm variables.

File

i18n_variable/i18n_variable.install, line 65
Installation file for Internationalization (i18n) module.

Code

function i18n_variable_update_7003() {
  drupal_load('module', 'variable_store');
  $variable_list = variable_get('i18n_variable_conf', array());
  variable_set('variable_realm_list_language', $variable_list);

  // Delete old variables from store that are not in the list.
  $old_variables = array_diff(variable_store_list_all('language'), variable_children($variable_list));
  foreach ($old_variables as $name) {
    variable_store_delete_all('language', NULL, $name);
  }
}