simplemenu.install 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // $Id$
  3. /**
  4. * Get rid of the variables used by simple menu.
  5. */
  6. function simplemenu_uninstall() {
  7. db_query("DELETE FROM {variable} WHERE name LIKE 'simplemenu_%'");
  8. }
  9. /**
  10. * Implementation of hook_update_N().
  11. */
  12. function simplemenu_update_6001() {
  13. // if navigation menu was used in Drupal 5 use the same in Drupal 6.
  14. // otherwise, we can't do anything.
  15. if (variable_get('simplemenu_menu', 1) == 1) {
  16. variable_set('simplemenu_menu', 'navigation:0');
  17. }
  18. return array();
  19. }
  20. /**
  21. * Implementation of hook_update_N().
  22. */
  23. function simplemenu_update_6002() {
  24. // fix variable name
  25. variable_set('simplemenu_detect_popup', variable_get('simplemenu_detect_popop', 1));
  26. variable_del('simplemenu_detect_popop');
  27. return array();
  28. }
  29. /**
  30. * Implementation of hook_update_N().
  31. */
  32. function simplemenu_update_6003() {
  33. if (variable_get('simplemenu_devel', 0)) {
  34. drupal_set_message('The Simplemenu Devel is now defined in a separate module. Enable that module if you want to use the devel menu.', 'warning');
  35. }
  36. variable_del('simplemenu_devel');
  37. return array();
  38. }
  39. // vim: ts=2 sw=2 et syntax=php