calendar.install 776 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall functions for the calendar module.
  5. *
  6. */
  7. function calendar_update_last_removed() {
  8. return 6002;
  9. }
  10. /**
  11. * Remove D6-style calendar legend block from block table.
  12. */
  13. function calendar_update_7000() {
  14. // Remove the former Calendar legend block, if any.
  15. db_query("DELETE FROM {block} WHERE module = 'calendar' AND delta = '0'");
  16. }
  17. /**
  18. * Uninstall Calendar iCal module so it can be removed.
  19. */
  20. function calendar_update_7001() {
  21. if (module_exists('calendar_ical')) {
  22. module_disable(array('calendar_ical'));
  23. }
  24. }
  25. /**
  26. * Delete calendar_default_view_options(), which was used by the old default view and is no longer used.
  27. */
  28. function calendar_update_7002() {
  29. variable_del('calendar_default_view_options');
  30. }