nodeformcols.install 652 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * Install and update hooks
  5. */
  6. /**
  7. * Implementation of hook_install().
  8. */
  9. function nodeformcols_install() {
  10. // We need our hook_theme() to run after node.module's hook_theme().
  11. db_update('system')
  12. ->fields(array('weight' => 1))
  13. ->condition('name', 'nodeformcols')
  14. ->condition('type', 'module')
  15. ->execute();
  16. }
  17. /**
  18. * Implementation of hook_uninstall().
  19. */
  20. function nodeformcols_uninstall() {
  21. $res = db_select('variable')
  22. ->fields('variable', array('name'))
  23. ->condition('name', 'nodeformscols_field_placements_%', 'LIKE')
  24. ->execute();
  25. foreach ($res as $v) {
  26. variable_del($v->name);
  27. }
  28. }