xmlsitemap_node.install 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * @file
  4. * Install and uninstall schema and functions for the xmlsitemap_node module.
  5. */
  6. /**
  7. * Implements hook_uninstall().
  8. */
  9. function xmlsitemap_node_uninstall() {
  10. drupal_load('module', 'node');
  11. drupal_load('module', 'xmlsitemap');
  12. $node_types = array_keys(node_type_get_names());
  13. foreach ($node_types as $node_type) {
  14. xmlsitemap_link_bundle_delete('node', $node_type);
  15. }
  16. }
  17. /**
  18. * Cleanup variables.
  19. */
  20. function xmlsitemap_node_update_6200() {
  21. drupal_load('module', 'node');
  22. drupal_load('module', 'xmlsitemap');
  23. $node_types = array_keys(node_type_get_names());
  24. foreach ($node_types as $node_type) {
  25. $settings = array(
  26. 'status' => variable_get('xmlsitemap_node_status_' . $node_type, XMLSITEMAP_STATUS_DEFAULT),
  27. 'priority' => variable_get('xmlsitemap_node_priority_' . $node_type, XMLSITEMAP_PRIORITY_DEFAULT),
  28. );
  29. variable_set('xmlsitemap_settings_node_' . $node_type, $settings);
  30. variable_del('xmlsitemap_node_status_' . $node_type);
  31. variable_del('xmlsitemap_node_priority_' . $node_type);
  32. variable_del('xmlsitemap_node_update_' . $node_type);
  33. }
  34. return array();
  35. }
  36. /**
  37. * Empty update.
  38. */
  39. function xmlsitemap_node_update_6201() {
  40. }