skinr_ui.install 926 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @file
  4. * Contains install, update, and uninstall functions for Skinr UI.
  5. */
  6. /**
  7. * Implements hook_install().
  8. */
  9. function skinr_ui_install() {
  10. // Skinr should go before contextual module.
  11. db_update('system')
  12. ->fields(array('weight' => -1))
  13. ->condition('name', 'skinr_ui')
  14. ->execute();
  15. }
  16. /**
  17. * Implements hook_uninstall().
  18. */
  19. function skinr_ui_uninstall() {
  20. variable_del('skinr_overlay_width');
  21. variable_del('skinr_overlay_height');
  22. }
  23. /**
  24. * Delete a few unused variables.
  25. *
  26. * @todo This is a badly converted function it should be
  27. * skinr_ui_update_6001(). Remove this function and implement
  28. * skinr_update_last_removed() instead.
  29. */
  30. function skinr_ui_update_7000() {
  31. variable_del('skinr_overlay_autofit');
  32. variable_del('skinr_overlay_draggable');
  33. return array(array('success' => TRUE, 'query' => "Some variables that are no longer used have been deleted."));
  34. }