extlink.install 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * @file
  4. * Install file for External Links module.
  5. */
  6. /**
  7. * Implements hook_install().
  8. */
  9. function extlink_install() {
  10. // Weight needs to be 1 for compatibility with SpamSpan.
  11. db_update('system')
  12. ->fields(array('weight' => 1))
  13. ->condition('name', 'extlink', '=')
  14. ->execute();
  15. }
  16. /**
  17. * Implements hook_uninstall().
  18. */
  19. function extlink_uninstall() {
  20. variable_del('extlink_alert');
  21. variable_del('extlink_alert_text');
  22. variable_del('extlink_class');
  23. variable_del('extlink_css_exclude');
  24. variable_del('extlink_css_explicit');
  25. variable_del('extlink_exclude');
  26. variable_del('extlink_icon_placement');
  27. variable_del('extlink_img_class');
  28. variable_del('extlink_include');
  29. variable_del('extlink_label');
  30. variable_del('extlink_mailto_class');
  31. variable_del('extlink_mailto_label');
  32. variable_del('extlink_subdomains');
  33. variable_del('extlink_target');
  34. cache_clear_all('variables', 'cache');
  35. }
  36. /**
  37. * Delete "extlink_target_value" variable (now uses "extlink_target" directly).
  38. */
  39. function extlink_update_7101(&$sandbox) {
  40. variable_del('extlink_target_value');
  41. }