Renames nodeapi to node.

Related topics

File

modules/trigger/trigger.install, line 101
Install, update and uninstall functions for the trigger module.

Code

function trigger_update_7002() {
  $result = db_query("SELECT hook, aid FROM {trigger_assignments}");
  foreach ($result as $record) {
    $new_hook = str_replace('nodeapi', 'node', $record->hook);
    db_update('trigger_assignments')
      ->fields(array(
      'hook' => $new_hook,
    ))
      ->condition('hook', $record->hook)
      ->condition('aid', $record->aid)
      ->execute();
  }
}