uc_termsofservice.install 701 B

1234567891011121314151617181920212223242526
  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. */
  19. function uc_termsofservice_update_7100() {
  20. variable_set('uc_termsofservice_checkout_rules',
  21. variable_get('uc_termsofservice_checkout_ca', FALSE));
  22. variable_del('uc_termsofservice_checkout_ca');
  23. }