You are here

function media_update_7003 in D7 Media 7.4

Same name and namespace in other branches
  1. 7 media.install \media_update_7003()
  2. 7.2 media.install \media_update_7003()
  3. 7.3 media.install \media_update_7003()

We now prefix media namespaced variables with media__, so fix old variables.

File

./media.install, line 256
Install, update and uninstall functions for the Media module.

Code

function media_update_7003() {
  drupal_load('module', 'media');
  foreach (media_variable_default() as $variable => $value) {
    if (($test = variable_get('media_' . $variable, TRUE)) == variable_get('media_' . $variable, FALSE)) {
      media_variable_set($variable, $test);
      variable_del('media_' . $variable);
    }
  }
}