function xmlsitemap_node_update_6196 in XML sitemap 6.2
Migrate 6.x-1.x node variables.
File
- xmlsitemap_node/
xmlsitemap_node.install, line 23 - Install and uninstall schema and functions for the xmlsitemap_node module.
Code
function xmlsitemap_node_update_6196() {
drupal_load('module', 'node');
$node_types = array_keys(node_get_types('names'));
foreach ($node_types as $node_type) {
$status = 0;
$priority = variable_get('xmlsitemap_node_type_priority_' . $node_type, 0.5);
if ($priority == -1) {
$priority = 0.5;
}
else {
$status = 1;
}
variable_set('xmlsitemap_node_status_' . $node_type, $status);
variable_set('xmlsitemap_node_priority_' . $node_type, $priority);
}
return array();
}