uc_termsofservice.install 711 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * @file
  4. * Install, update, and uninstall functions for the uc_termsofservice module.
  5. */
  6. /**
  7. * Implements hook_uninstall().
  8. */
  9. function uc_termsofservice_uninstall() {
  10. // Remove all module variables from the database.
  11. db_delete('variable')
  12. ->condition('name', db_like('uc_termsofservice_') . '%', 'LIKE')
  13. ->execute();
  14. cache_clear_all('variables', 'cache_bootstrap');
  15. }
  16. /**
  17. * Renames uc_termsofservice_checkout_ca to uc_termsofservice_checkout_rules
  18. * for D7.
  19. */
  20. function uc_termsofservice_update_7100() {
  21. variable_set('uc_termsofservice_checkout_rules',
  22. variable_get('uc_termsofservice_checkout_ca', FALSE));
  23. variable_del('uc_termsofservice_checkout_ca');
  24. }