<?php

/**
 * @file
 * Installation file for the automatic nodetitle module
 */

/**
 * Implements hook_install().
 */
function auto_nodetitle_install() {
  db_query("UPDATE {system} SET weight = 5 WHERE name = 'auto_nodetitle'");
}

/**
 * Implements hook_uninstall().
 */
function auto_nodetitle_uninstall() {
  foreach (node_type_get_names('names') as $type => $type_name) {
    variable_del('ant_' . $type);
    variable_del('ant_pattern_' . $type);
    variable_del('ant_php_' . $type);
  }
}

/**
 * make sure hooks are invoked after cck main hooks
 */
function auto_nodetitle_update_1() {
  $ret = array();
  $ret[] = update_sql("UPDATE {system} SET weight = 5 WHERE name = 'auto_nodetitle'");
  return $ret;
}