function xmlsitemap_update_6201 in XML sitemap 6.2
Cleanup any remaining 6.x-1.x tables, variables or weights.
File
- ./
xmlsitemap.install, line 518 - Install, update and uninstall functions for the xmlsitemap module.
Code
function xmlsitemap_update_6201() {
$ret = array();
if (db_table_exists('xmlsitemap_additional')) {
db_drop_table($ret, 'xmlsitemap_additional');
}
if (db_table_exists('xmlsitemap_modules')) {
db_drop_table($ret, 'xmlsitemap_modules');
}
if (db_table_exists('xmlsitemap_file')) {
db_drop_table($ret, 'xmlsitemap_file');
}
// Take care of any stray 6.x-1.x modules that are no longer supported.
$modules = array(
'xmlsitemap_file',
'xmlsitemap_helper',
'xmlsitemap_term',
);
module_disable($modules);
foreach ($modules as $module) {
drupal_set_installed_schema_version($module, SCHEMA_UNINSTALLED);
}
variable_del('xmlsitemap_all_links_to_default_language');
variable_del('xmlsitemap_cache_directory');
// xmlsitemap_chunk_size not deleted since we use the same variable name.
db_query("DELETE FROM {variable} WHERE name LIKE 'xmlsitemap_create_cache_result_%%'");
variable_del('xmlsitemap_cron_limit');
variable_del('xmlsitemap_cron_submit');
variable_del('xmlsitemap_cron_submit_frequency');
variable_del('xmlsitemap_front_page_changefreq');
variable_del('xmlsitemap_front_page_priority');
variable_del('xmlsitemap_log_access');
variable_del('xmlsitemap_previous_chunks_count');
variable_del('xmlsitemap_sitemap_is_changed');
variable_del('xmlsitemap_sitemap_needs_update');
variable_del('xmlsitemap_submit');
variable_del('xmlsitemap_update_sitemap_request');
variable_del('xmlsitemap_update_timestamp');
variable_del('xmlsitemap_use_stylesheet');
$ret[] = update_sql("UPDATE {system} SET weight = 1 WHERE type = 'module' AND name = 'xmlsitemap'");
return $ret;
}