better_formats.install 727 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @file
  4. * Installs the better_formats module.
  5. *
  6. * Creates a database for use of multi-layered default formats and sets
  7. * default settings.
  8. */
  9. /**
  10. * Implements of hook_install().
  11. */
  12. function better_formats_install() {
  13. // Increase module weight to prevent compatibility issues.
  14. db_update('system')
  15. ->fields(array('weight' => 100))
  16. ->condition('name', 'better_formats')
  17. ->execute();
  18. }
  19. /**
  20. * Implements of hook_uninstall().
  21. */
  22. function better_formats_uninstall() {
  23. // Delete settings from varible table.
  24. db_delete('variable')
  25. ->condition('name', 'better_formats%', 'LIKE')
  26. ->execute();
  27. }
  28. /**
  29. * Update from 6.x-1.2 to 7.x-1.0.
  30. */
  31. /*
  32. function better_formats_update_7000() {
  33. }
  34. */