You are here

function xmlsitemap_taxonomy_update_6196 in XML sitemap 6.2

Migrate 6.x-1.x taxonomy variables.

File

xmlsitemap_taxonomy/xmlsitemap_taxonomy.install, line 23
Install and uninstall schema and functions for the xmlsitemap_taxonomy module.

Code

function xmlsitemap_taxonomy_update_6196() {
  drupal_load('module', 'taxonomy');
  $vids = array_keys(taxonomy_get_vocabularies());
  foreach ($vids as $vid) {
    $status = 0;
    $priority = variable_get('xmlsitemap_taxonomy_vocabulary_priority_' . $vid, 0.5);
    if ($priority == -1) {
      $priority = 0.5;
    }
    else {
      $status = 1;
    }
    variable_set('xmlsitemap_taxonomy_status_' . $vid, $status);
    variable_set('xmlsitemap_taxonomy_priority_' . $vid, $priority);
  }
  return array();
}