You are here

function i18n_variable_update_7001 in Internationalization 7

Move variables from old storage to new table

1 call to i18n_variable_update_7001()
i18n_variable_install in i18n_variable/i18n_variable.install
Implements hook_install().

File

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

Code

function i18n_variable_update_7001() {
  drupal_load('module', 'variable_store');
  foreach (db_select('i18n_variable', 'v')
    ->fields('v')
    ->execute()
    ->fetchAll() as $variable) {
    variable_store_set('language', $variable->language, $variable->name, unserialize($variable->value));
  }
}