auto_nodetitle.install 717 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @file
  4. * Installation file for the automatic nodetitle module
  5. */
  6. /**
  7. * Implements hook_install().
  8. */
  9. function auto_nodetitle_install() {
  10. db_query("UPDATE {system} SET weight = 5 WHERE name = 'auto_nodetitle'");
  11. }
  12. /**
  13. * Implements hook_uninstall().
  14. */
  15. function auto_nodetitle_uninstall() {
  16. foreach (node_type_get_names('names') as $type => $type_name) {
  17. variable_del('ant_' . $type);
  18. variable_del('ant_pattern_' . $type);
  19. variable_del('ant_php_' . $type);
  20. }
  21. }
  22. /**
  23. * make sure hooks are invoked after cck main hooks
  24. */
  25. function auto_nodetitle_update_1() {
  26. $ret = array();
  27. $ret[] = update_sql("UPDATE {system} SET weight = 5 WHERE name = 'auto_nodetitle'");
  28. return $ret;
  29. }