You are here

function xmlsitemap_update_6196 in XML sitemap 6.2

Upgrade 6.x-1.x variables.

File

./xmlsitemap.install, line 358
Install, update and uninstall functions for the xmlsitemap module.

Code

function xmlsitemap_update_6196() {
  $value = variable_get('xmlsitemap_cron_limit', 100);
  variable_set('xmlsitemap_batch_limit', $value);
  $value = variable_get('xmlsitemap_cache_directory', file_directory_path() . '/xmlsitemap');
  if (strpos($value, file_directory_path() . '/') === 0) {
    $value = str_replace(file_directory_path() . '/', '', $value);
  }
  else {
    $value = 'xmlsitemap';
  }
  variable_set('xmlsitemap_path', $value);
  $value = variable_get('xmlsitemap_use_stylesheet', FALSE);
  variable_set('xmlsitemap_xsl', $value);
  $value = variable_get('xmlsitemap_front_page_changefreq', 3600);
  variable_set('xmlsitemap_frontpage_changefreq', $value);
  $value = variable_get('xmlsitemap_front_page_priority', 1);
  variable_set('xmlsitemap_frontpage_priority', $value);

  // Intentionally set this variables so we get a generated sitemap ASAP.
  variable_set('xmlsitemap_generated_last', 0);
  variable_set('xmlsitemap_regenerate_needed', TRUE);
  variable_del('xmlsitemap_chunk_size');
  return array();
}