You are here

function noderelationships_enable in Node Relationships 6

Implementation of hook_enable().

File

./noderelationships.install, line 44
Implementation of installation/uninstallation hooks.

Code

function noderelationships_enable() {

  // Alter the module weight so that our hook_nodeapi('prepare translation') is
  // executed just after the content module.
  // This is needed because we want to undo the changes made by nodereference
  // module during hook_field('prepare translation').
  $weight = (int) db_result(db_query("SELECT weight FROM {system} WHERE type = 'module' AND name = 'content'"));
  db_query("UPDATE {system} SET weight = %d WHERE type = 'module' AND name = 'noderelationships'", $weight + 1);

  // Notify the content module.
  drupal_load('module', 'content');
  content_notify('enable', 'noderelationships');
}