Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.473
diff -u -r1.473 forum.module
--- modules/forum/forum.module	11 Nov 2008 16:49:37 -0000	1.473
+++ modules/forum/forum.module	4 Dec 2008 16:39:27 -0000
@@ -183,7 +183,7 @@
 /**
  * Implementation of hook_nodeapi_view().
  */
-function forum_nodeapi_view(&$node, $teaser, $page) {
+function forum_nodeapi_view($node, $teaser, $page) {
   $vid = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
   if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
@@ -221,7 +221,7 @@
 /**
  * Implementation of hook_nodeapi_prepare().
  */
-function forum_nodeapi_prepare(&$node, $teaser, $page) {
+function forum_nodeapi_prepare($node) {
   $vid = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
   if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
@@ -238,7 +238,7 @@
  *
  * Check in particular that only a "leaf" term in the associated taxonomy.
  */
-function forum_nodeapi_validate(&$node, $teaser, $page) {
+function forum_nodeapi_validate($node, $form) {
   $vid = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
   if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
@@ -264,7 +264,7 @@
  *
  * Assign forum taxonomy when adding a topic from within a forum.
  */
-function forum_nodeapi_presave(&$node, $teaser, $page) {
+function forum_nodeapi_presave($node) {
   $vid = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
   if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
@@ -293,7 +293,7 @@
 /**
  * Implementation of hook_nodeapi_update().
  */
-function forum_nodeapi_update(&$node, $teaser, $page) {
+function forum_nodeapi_update($node) {
   $vid = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
   if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
@@ -317,7 +317,7 @@
 /**
  * Implementation of hook_nodeapi_insert().
  */
-function forum_nodeapi_insert(&$node, $teaser, $page) {
+function forum_nodeapi_insert($node) {
   $vid = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
   if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
@@ -330,7 +330,7 @@
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function forum_nodeapi_delete(&$node, $teaser, $page) {
+function forum_nodeapi_delete($node) {
   $vid = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
   if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
@@ -341,7 +341,7 @@
 /**
  * Implementation of hook_nodeapi_load().
  */
-function forum_nodeapi_load(&$node, $teaser, $page) {
+function forum_nodeapi_load($node) {
   $vid = variable_get('forum_nav_vocabulary', '');
   $vocabulary = taxonomy_vocabulary_load($vid);
   if (_forum_nodeapi_check_node_type($node, $vocabulary)) {
Index: modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.312
diff -u -r1.312 blog.module
--- modules/blog/blog.module	1 Nov 2008 18:23:12 -0000	1.312
+++ modules/blog/blog.module	4 Dec 2008 16:39:24 -0000
@@ -72,7 +72,7 @@
 /**
  * Implementation of hook_form().
  */
-function blog_form(&$node) {
+function blog_form($node, $form_state) {
   global $nid;
   $type = node_get_types('type', $node);
 
@@ -84,7 +84,7 @@
 /**
  * Implementation of hook_view().
  */
-function blog_view($node, $teaser = FALSE, $page = FALSE) {
+function blog_view($node, $teaser, $page) {
   if ($page) {
     // Breadcrumb navigation.
     drupal_set_breadcrumb(array(l(t('Home'), NULL), l(t('Blogs'), 'blog'), l(t("!name's blog", array('!name' => $node->name)), 'blog/' . $node->uid)));
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.287
diff -u -r1.287 statistics.module
--- modules/statistics/statistics.module	2 Dec 2008 21:24:34 -0000	1.287
+++ modules/statistics/statistics.module	4 Dec 2008 16:39:30 -0000
@@ -325,7 +325,7 @@
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function statistics_nodeapi_delete(&$node, $arg = 0) {
+function statistics_nodeapi_delete($node) {
   // clean up statistics table when node is deleted
   db_query('DELETE FROM {node_counter} WHERE nid = %d', $node->nid);
 }
Index: modules/trigger/trigger.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.module,v
retrieving revision 1.22
diff -u -r1.22 trigger.module
--- modules/trigger/trigger.module	11 Nov 2008 16:49:38 -0000	1.22
+++ modules/trigger/trigger.module	4 Dec 2008 16:39:31 -0000
@@ -204,7 +204,7 @@
  *
  * @TODO: Take advantage of the new API and reorganise/remove this function.
  */
-function _trigger_nodeapi(&$node, $op, $a3, $a4) {
+function _trigger_nodeapi($node, $op, $a3 = NULL, $a4 = NULL) {
   // Keep objects for reuse so that changes actions make to objects can persist.
   static $objects;
   // Prevent recursion by tracking which operations have already been called.
@@ -245,36 +245,36 @@
 /**
  * Implementation of hook_nodeapi_view().
  */
-function trigger_nodeapi_view(&$node, $a3, $a4) {
-  _trigger_nodeapi($node, 'view', $a3, $a4);
+function trigger_nodeapi_view($node, $teaser, $page) {
+  _trigger_nodeapi($node, 'view', $teaser, $page);
 }
 
 /**
  * Implementation of hook_nodeapi_update().
  */
-function trigger_nodeapi_update(&$node, $a3, $a4) {
-  _trigger_nodeapi($node, 'update', $a3, $a4);
+function trigger_nodeapi_update($node) {
+  _trigger_nodeapi($node, 'update');
 }
 
 /**
  * Implementation of hook_nodeapi_presave().
  */
-function trigger_nodeapi_presave(&$node, $a3, $a4) {
-  _trigger_nodeapi($node, 'presave', $a3, $a4);
+function trigger_nodeapi_presave($node) {
+  _trigger_nodeapi($node, 'presave');
 }
 
 /**
  * Implementation of hook_nodeapi_insert().
  */
-function trigger_nodeapi_insert(&$node, $a3, $a4) {
-  _trigger_nodeapi($node, 'insert', $a3, $a4);
+function trigger_nodeapi_insert($node) {
+  _trigger_nodeapi($node, 'insert');
 }
 
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function trigger_nodeapi_delete(&$node, $a3, $a4) {
-  _trigger_nodeapi($node, 'delete', $a3, $a4);
+function trigger_nodeapi_delete($node) {
+  _trigger_nodeapi($node, 'delete');
 }
 
 /**
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.668
diff -u -r1.668 comment.module
--- modules/comment/comment.module	3 Dec 2008 16:32:21 -0000	1.668
+++ modules/comment/comment.module	4 Dec 2008 16:39:26 -0000
@@ -579,7 +579,7 @@
 /**
  * Implementation of hook_nodeapi_load().
  */
-function comment_nodeapi_load(&$node, $arg = 0) {
+function comment_nodeapi_load($node) {
   if ($node->comment != COMMENT_NODE_DISABLED) {
     return db_query('SELECT last_comment_timestamp, last_comment_name, comment_count FROM {node_comment_statistics} WHERE nid = :nid', array(':nid' => $node->nid))->fetchAssoc();
   }
@@ -589,7 +589,7 @@
 /**
  * Implementation of hook_nodeapi_prepare().
  */
-function comment_nodeapi_prepare(&$node, $arg = 0) {
+function comment_nodeapi_prepare($node) {
   if (!isset($node->comment)) {
     $node->comment = variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE);
   }
@@ -598,7 +598,7 @@
 /**
  * Implementation of hook_nodeapi_insert().
  */
-function comment_nodeapi_insert(&$node, $arg = 0) {
+function comment_nodeapi_insert($node) {
   db_insert('node_comment_statistics')
     ->fields(array(
       'nid' => $node->nid,
@@ -612,7 +612,7 @@
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function comment_nodeapi_delete(&$node, $arg = 0) {
+function comment_nodeapi_delete($node) {
   db_delete('comment')
     ->condition('nid', $node->nid)
     ->execute();
@@ -624,7 +624,7 @@
 /**
  * Implementation of hook_nodeapi_update_index().
  */
-function comment_nodeapi_update_index(&$node, $arg = 0) {
+function comment_nodeapi_update_index($node) {
   $text = '';
   $comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED));
   foreach ($comments as $comment) {
@@ -636,7 +636,7 @@
 /**
  * Implementation of hook_nodeapi_search_result().
  */
-function comment_nodeapi_search_result(&$node, $arg = 0) {
+function comment_nodeapi_search_result($node) {
   $comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid))->fetchField();
   return format_plural($comments, '1 comment', '@count comments');
 }
@@ -644,7 +644,7 @@
 /**
  * Implementation of hook_nodeapi_rss_item().
  */
-function comment_nodeapi_rss_item(&$node, $arg = 0) {
+function comment_nodeapi_rss_item($node) {
   if ($node->comment != COMMENT_NODE_DISABLED) {
     return array(array('key' => 'comments', 'value' => url('node/' . $node->nid, array('fragment' => 'comments', 'absolute' => TRUE))));
   }
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.277
diff -u -r1.277 poll.module
--- modules/poll/poll.module	12 Oct 2008 04:30:07 -0000	1.277
+++ modules/poll/poll.module	4 Dec 2008 16:39:30 -0000
@@ -427,7 +427,7 @@
 /**
  * Implementation of hook_validate().
  */
-function poll_validate($node) {
+function poll_validate($node, $form) {
   if (isset($node->title)) {
     // Check for at least two options and validate amount of votes:
     $realchoices = 0;
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.277
diff -u -r1.277 search.module
--- modules/search/search.module	3 Dec 2008 16:32:22 -0000	1.277
+++ modules/search/search.module	4 Dec 2008 16:39:30 -0000
@@ -638,7 +638,7 @@
 /**
  * Implementation of hook_nodeapi_update_index().
  */
-function search_nodeapi_update_index(&$node, $teaser = NULL, $page = NULL) {
+function search_nodeapi_update_index($node) {
   // Transplant links to a node into the target node.
   $result = db_query("SELECT caption FROM {search_node_links} WHERE nid = %d", $node->nid);
   $output = array();
@@ -651,7 +651,7 @@
 /**
  * Implementation of hook_nodeapi_update().
  */
-function search_nodeapi_update(&$node, $teaser = NULL, $page = NULL) {
+function search_nodeapi_update($node) {
   // Reindex the node when it is updated.  The node is automatically indexed
   // when it is added, simply by being added to the node table.
   search_touch_node($node->nid);
Index: modules/path/path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.module,v
retrieving revision 1.150
diff -u -r1.150 path.module
--- modules/path/path.module	22 Nov 2008 10:49:01 -0000	1.150
+++ modules/path/path.module	4 Dec 2008 16:39:27 -0000
@@ -120,7 +120,7 @@
 /**
  * Implementation of hook_nodeapi_validate().
  */
-function path_nodeapi_validate(&$node, $arg) {
+function path_nodeapi_validate($node, $form) {
   if (user_access('create url aliases') || user_access('administer url aliases')) {
     if (isset($node->path)) {
       $language = isset($node->language) ? $node->language : '';
@@ -135,7 +135,7 @@
 /**
  * Implementation of hook_nodeapi_load().
  */
-function path_nodeapi_load(&$node, $arg) {
+function path_nodeapi_load($node) {
   $language = isset($node->language) ? $node->language : '';
   $path = 'node/' . $node->nid;
   $alias = drupal_get_path_alias($path, $language);
@@ -147,7 +147,7 @@
 /**
  * Implementation of hook_nodeapi_insert().
  */
-function path_nodeapi_insert(&$node, $arg) {
+function path_nodeapi_insert($node) {
   if (user_access('create url aliases') || user_access('administer url aliases')) {
     $language = isset($node->language) ? $node->language : '';
     // Don't try to insert if path is NULL. We may have already set
@@ -161,7 +161,7 @@
 /**
  * Implementation of hook_nodeapi_update().
  */
-function path_nodeapi_update(&$node, $arg) {
+function path_nodeapi_update($node) {
   if (user_access('create url aliases') || user_access('administer url aliases')) {
     $language = isset($node->language) ? $node->language : '';
     path_set_alias('node/' . $node->nid, isset($node->path) ? $node->path : NULL, isset($node->pid) ? $node->pid : NULL, $language);
@@ -171,7 +171,7 @@
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function path_nodeapi_delete(&$node, $arg) {
+function path_nodeapi_delete($node) {
   if (user_access('create url aliases') || user_access('administer url aliases')) {
     $language = isset($node->language) ? $node->language : '';
     $path = 'node/' . $node->nid;
Index: modules/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.218
diff -u -r1.218 upload.module
--- modules/upload/upload.module	24 Nov 2008 12:08:45 -0000	1.218
+++ modules/upload/upload.module	4 Dec 2008 16:39:32 -0000
@@ -300,7 +300,7 @@
 /**
  * Implementation of hook_nodeapi_load().
  */
-function upload_nodeapi_load(&$node, $teaser) {
+function upload_nodeapi_load($node) {
   if (variable_get("upload_$node->type", 1) == 1) {
     $output = array('files' => upload_load($node));
     return $output;
@@ -310,7 +310,7 @@
 /**
  * Implementation of hook_nodeapi_view().
  */
-function upload_nodeapi_view(&$node, $teaser) {
+function upload_nodeapi_view($node, $teaser, $page) {
   if (isset($node->files) && user_access('view uploaded files')) {
     // Add the attachments list to node body with a heavy
     // weight to ensure they're below other elements
@@ -328,7 +328,7 @@
 /**
  * Implementation of hook_nodeapi_insert().
  */
-function upload_nodeapi_insert(&$node, $teaser) {
+function upload_nodeapi_insert($node) {
   if (user_access('upload files')) {
     upload_save($node);
   }
@@ -337,7 +337,7 @@
 /**
  * Implementation of hook_nodeapi_update().
  */
-function upload_nodeapi_update(&$node, $teaser) {
+function upload_nodeapi_update($node) {
   if (user_access('upload files')) {
     upload_save($node);
   }
@@ -346,7 +346,7 @@
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function upload_nodeapi_delete(&$node, $teaser) {
+function upload_nodeapi_delete($node) {
   db_delete('upload')->condition('nid', $node->nid)->execute();
   if (!is_array($node->files)) {
     return;
@@ -359,7 +359,7 @@
 /**
  * Implementation of hook_nodeapi_delete_revision().
  */
-function upload_nodeapi_delete_revision(&$node, $teaser) {
+function upload_nodeapi_delete_revision($node) {
   db_delete('upload')->condition('vid', $node->vid)->execute();
   if (!is_array($node->files)) {
     return;
@@ -372,14 +372,14 @@
 /**
  * Implementation of hook_nodeapi_search_result().
  */
-function upload_nodeapi_search_result(&$node, $teaser) {
+function upload_nodeapi_search_result($node) {
   return isset($node->files) && is_array($node->files) ? format_plural(count($node->files), '1 attachment', '@count attachments') : NULL;
 }
 
 /**
  * Implementation of hook_nodeapi_rss_item().
  */
-function upload_nodeapi_rss_item(&$node, $teaser) {
+function upload_nodeapi_rss_item($node) {
   if (is_array($node->files)) {
     $files = array();
     foreach ($node->files as $file) {
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.443
diff -u -r1.443 taxonomy.module
--- modules/taxonomy/taxonomy.module	4 Dec 2008 10:57:17 -0000	1.443
+++ modules/taxonomy/taxonomy.module	4 Dec 2008 16:39:30 -0000
@@ -1210,7 +1210,7 @@
 /**
  * Implementation of hook_nodeapi_load().
  */
-function taxonomy_nodeapi_load($node, $arg = 0) {
+function taxonomy_nodeapi_load($node) {
   $output['taxonomy'] = taxonomy_node_get_terms($node);
   return $output;
 }
@@ -1218,7 +1218,7 @@
 /**
  * Implementation of hook_nodeapi_insert().
  */
-function taxonomy_nodeapi_insert($node, $arg = 0) {
+function taxonomy_nodeapi_insert($node) {
   if (!empty($node->taxonomy)) {
     taxonomy_node_save($node, $node->taxonomy);
   }
@@ -1227,7 +1227,7 @@
 /**
  * Implementation of hook_nodeapi_update().
  */
-function taxonomy_nodeapi_update($node, $arg = 0) {
+function taxonomy_nodeapi_update($node) {
   if (!empty($node->taxonomy)) {
     taxonomy_node_save($node, $node->taxonomy);
   }
@@ -1236,42 +1236,42 @@
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function taxonomy_nodeapi_delete($node, $arg = 0) {
+function taxonomy_nodeapi_delete($node) {
   taxonomy_node_delete($node);
 }
 
 /**
  * Implementation of hook_nodeapi_delete_revision().
  */
-function taxonomy_nodeapi_delete_revision($node, $arg = 0) {
+function taxonomy_nodeapi_delete_revision($node) {
   taxonomy_node_delete_revision($node);
 }
 
 /**
  * Implementation of hook_nodeapi_validate().
  */
-function taxonomy_nodeapi_validate($node, $arg = 0) {
+function taxonomy_nodeapi_validate($node, $form) {
   taxonomy_node_validate($node);
 }
 
 /**
  * Implementation of hook_nodeapi_rss_item().
  */
-function taxonomy_nodeapi_rss_item($node, $arg = 0) {
+function taxonomy_nodeapi_rss_item($node) {
   return taxonomy_rss_item($node);
 }
 
 /**
  * Implementation of hook_nodeapi_update_index().
  */
-function taxonomy_nodeapi_update_index($node, $arg = 0) {
+function taxonomy_nodeapi_update_index($node) {
   return taxonomy_node_update_index($node);
 }
 
 /**
  * Implementation of hook_nodeapi('update_index').
  */
-function taxonomy_node_update_index(&$node) {
+function taxonomy_node_update_index($node) {
   $output = array();
   foreach ($node->taxonomy as $term) {
     $output[] = $term->name;
Index: modules/translation/translation.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.module,v
retrieving revision 1.34
diff -u -r1.34 translation.module
--- modules/translation/translation.module	11 Nov 2008 16:49:38 -0000	1.34
+++ modules/translation/translation.module	4 Dec 2008 16:39:31 -0000
@@ -186,7 +186,7 @@
 /**
  * Implementation of hook_nodeapi_prepare().
  */
-function translation_nodeapi_prepare(&$node, $teaser, $page) {
+function translation_nodeapi_prepare($node) {
   // Only act if we are dealing with a content type supporting translations.
   if (translation_supported_type($node->type)) {
     if (empty($node->nid) && isset($_GET['translation']) && isset($_GET['language']) &&
@@ -207,7 +207,7 @@
 /**
  * Implementation of hook_nodeapi_insert().
  */
-function translation_nodeapi_insert(&$node, $teaser, $page) {
+function translation_nodeapi_insert($node) {
   // Only act if we are dealing with a content type supporting translations.
   if (translation_supported_type($node->type)) {
     if (!empty($node->translation_source)) {
@@ -228,7 +228,7 @@
 /**
  * Implementation of hook_nodeapi_update().
  */
-function translation_nodeapi_update(&$node, $teaser, $page) {
+function translation_nodeapi_update($node) {
   // Only act if we are dealing with a content type supporting translations.
   if (translation_supported_type($node->type)) {
     if (isset($node->translation) && $node->translation && !empty($node->language) && $node->tnid) {
@@ -245,7 +245,7 @@
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function translation_nodeapi_delete(&$node, $teaser, $page) {
+function translation_nodeapi_delete($node) {
   // Only act if we are dealing with a content type supporting translations.
   if (translation_supported_type($node->type)) {
     translation_remove_from_set($node);
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.475
diff -u -r1.475 book.module
--- modules/book/book.module	16 Nov 2008 19:41:14 -0000	1.475
+++ modules/book/book.module	4 Dec 2008 16:39:25 -0000
@@ -705,7 +705,7 @@
 /**
  * Implementation of hook_nodeapi_load().
  */
-function book_nodeapi_load(&$node, $teaser, $page) {
+function book_nodeapi_load($node) {
   // Note - we cannot use book_link_load() because it will call node_load().
   $info['book'] = db_query('SELECT * FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = :nid', array(
     ':nid' => $node->nid
@@ -723,7 +723,7 @@
 /**
  * Implementation of hook_nodeapi_view().
  */
-function book_nodeapi_view(&$node, $teaser, $page) {
+function book_nodeapi_view($node, $teaser, $page) {
   if (!$teaser) {
     if (!empty($node->book['bid']) && $node->build_mode == NODE_BUILD_NORMAL) {
       $node->content['book_navigation'] = array(
@@ -742,7 +742,7 @@
 /**
  * Implementation of hook_nodeapi_presave().
  */
-function book_nodeapi_presave(&$node, $teaser, $page) {
+function book_nodeapi_presave($node) {
   // Always save a revision for non-administrators.
   if (!empty($node->book['bid']) && !user_access('administer nodes')) {
     $node->revision = 1;
@@ -756,7 +756,7 @@
 /**
  * Implementation of hook_nodeapi_insert().
  */
-function book_nodeapi_insert(&$node, $teaser, $page) {
+function book_nodeapi_insert($node) {
   if (!empty($node->book['bid'])) {
     if ($node->book['bid'] == 'new') {
       // New nodes that are their own book.
@@ -771,7 +771,7 @@
 /**
  * Implementation of hook_nodeapi_update().
  */
-function book_nodeapi_update(&$node, $teaser, $page) {
+function book_nodeapi_update($node) {
   if (!empty($node->book['bid'])) {
     if ($node->book['bid'] == 'new') {
       // New nodes that are their own book.
@@ -786,7 +786,7 @@
 /**
  * Implementation of hook_nodeapi_delete().
  */
-function book_nodeapi_delete(&$node, $teaser, $page) {
+function book_nodeapi_delete($node) {
   if (!empty($node->book['bid'])) {
     if ($node->nid == $node->book['bid']) {
       // Handle deletion of a top-level post.
@@ -809,7 +809,7 @@
 /**
  * Implementation of hook_nodeapi_prepare().
  */
-function book_nodeapi_prepare(&$node, $teaser, $page) {
+function book_nodeapi_prepare($node) {
   // Prepare defaults for the add/edit form.
   if (empty($node->book) && (user_access('add content to books') || user_access('administer book outlines'))) {
     $node->book = array();
Index: modules/node/node.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.api.php,v
retrieving revision 1.1
diff -u -r1.1 node.api.php
--- modules/node/node.api.php	25 Nov 2008 02:37:32 -0000	1.1
+++ modules/node/node.api.php	4 Dec 2008 16:39:27 -0000
@@ -155,100 +155,244 @@
 }
 
 /**
- * Act on nodes defined by other modules.
+ * Fiter, substitute or otherwise alter the $node's raw text.
  *
- * Despite what its name might make you think, hook_nodeapi() is not
- * reserved for node modules. On the contrary, it allows modules to react
- * to actions affecting all kinds of nodes, regardless of whether that
- * module defined the node.
- *
- * It is common to find hook_nodeapi() used in conjunction with
- * hook_form_alter(). Modules use hook_form_alter() to place additional form
- * elements onto the node edit form, and hook_nodeapi() is used to read and
- * write those values to and from the database.
+ * The $node->content array has been rendered, so the node body or
+ * teaser is filtered and now contains HTML. This hook should only be 
+ * used when text substitution, filtering, or other raw text operations 
+ * are necessary.
+ * 
+ * @param $node
+ *   The node the action is being performed on.
+ * @param $teaser
+ *   The $teaser parameter from node_view().
+ * @param $page
+ *   The $page parameter from node_view().
+ * @return
+ *   None.
+ */
+function hook_nodeapi_alter($node, $teaser, $page) {
+}
+
+/**
+ * Act on node deletion.
  *
- * @param &$node
+ * @param $node
+ *   The node that is being deleted.
+ * @return
+ *   None.
+ */
+function hook_nodeapi_delete($node) {
+  db_query('DELETE FROM {mytable} WHERE nid = %d', $node->nid);
+}
+
+/**
+ * A revision of the node is deleted.
+ *
+ * You can delete data associated with that revision.
+ *
+ * @param $node
  *   The node the action is being performed on.
- * @param $op
- *   What kind of action is being performed. Possible values:
- *   - "alter": the $node->content array has been rendered, so the node body or
- *     teaser is filtered and now contains HTML. This op should only be used when
- *     text substitution, filtering, or other raw text operations are necessary.
- *   - "delete": The node is being deleted.
- *   - "delete_revision": The revision of the node is deleted. You can delete data
- *     associated with that revision.
- *   - "insert": The node is being created (inserted in the database).
- *   - "load": The node is about to be loaded from the database. This hook
- *     can be used to load additional data at this time.
- *   - "prepare": The node is about to be shown on the add/edit form.
- *   - "prepare_translation": The node is being cloned for translation. Load
- *     additional data or copy values from $node->translation_source.
- *   - "print": Prepare a node view for printing. Used for printer-friendly
- *     view in book_module
- *   - "rss_item": An RSS feed is generated. The module can return properties
- *     to be added to the RSS item generated for this node. See comment_nodeapi()
- *     and upload_nodeapi() for examples. The $node passed can also be modified
- *     to add or remove contents to the feed item.
- *   - "search_result": The node is displayed as a search result. If you
- *     want to display extra information with the result, return it.
- *   - "presave": The node passed validation and is about to be saved. Modules may
- *      use this to make changes to the node before it is saved to the database.
- *   - "update": The node is being updated.
- *   - "update_index": The node is being indexed. If you want additional
- *     information to be indexed which is not already visible through
- *     nodeapi "view", then you should return it here.
- *   - "validate": The user has just finished editing the node and is
- *     trying to preview or submit it. This hook can be used to check
- *     the node data. Errors should be set with form_set_error().
- *   - "view": The node content is being assembled before rendering. The module
- *     may add elements $node->content prior to rendering. This hook will be
- *     called after hook_view().  The format of $node->content is the same as
- *     used by Forms API.
- * @param $a3
- *   - For "view", passes in the $teaser parameter from node_view().
- *   - For "validate", passes in the $form parameter from node_validate().
- * @param $a4
- *   - For "view", passes in the $page parameter from node_view().
- * @return
- *   This varies depending on the operation.
- *   - The "presave", "insert", "update", "delete", "print" and "view"
- *     operations have no return value.
- *   - The "load" operation should return an array containing pairs
- *     of fields => values to be merged into the node object.
- *
- * If you are writing a node module, do not use this hook to perform
- * actions on your type of node alone. Instead, use the hooks set aside
- * for node modules, such as hook_insert() and hook_form(). That said, for
- * some operations, such as "delete_revision" or "rss_item" there is no
- * corresponding hook so even the module defining the node will need to
- * implement hook_nodeapi().
+ * @return
+ *   None.
  */
-function hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
-  switch ($op) {
-    case 'presave':
-      if ($node->nid && $node->moderate) {
-        // Reset votes when node is updated:
-        $node->score = 0;
-        $node->users = '';
-        $node->votes = 0;
-      }
-      break;
-    case 'insert':
-    case 'update':
-      if ($node->moderate && user_access('access submission queue')) {
-        drupal_set_message(t('The post is queued for approval'));
-      }
-      elseif ($node->moderate) {
-        drupal_set_message(t('The post is queued for approval. The editors will decide whether it should be published.'));
-      }
-      break;
-    case 'view':
-      $node->content['my_additional_field'] = array(
-        '#value' => theme('mymodule_my_additional_field', $additional_field),
-        '#weight' => 10,
-      );
-      break;
+function hook_nodeapi_delete_revision($node) {
+  db_delete('upload')->condition('vid', $node->vid)->execute();
+  if (!is_array($node->files)) {
+    return;
   }
+  foreach ($node->files as $file) {
+    file_delete($file);
+  }
+}
+
+/**
+ * The node being created (inserted in the database).
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @return
+ *   None.
+ */
+function hook_nodeapi_insert($node) {
+  db_query("INSERT INTO {mytable} (nid, extra) VALUES (%d, '%s')", $node->nid, $node->extra);
+}
+
+/**
+ * The node is being loaded from the database.
+ *
+ * This hook can be used to load additional data at this time.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ *
+ * @return
+ *   An array containing pairs of fields => values to be merged into the node
+ *   object.
+ */
+function hook_nodeapi_load($node) {
+  $additions = db_fetch_array(db_query('SELECT * FROM {mytable} WHERE vid = %d', $node->vid));
+  return $additions;
+}
+
+/**
+ * The node is about to be shown on the add/edit form.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @return
+ *   None.
+ */
+function hook_nodeapi_prepare($node) {
+  if (!isset($node->comment)) {
+    $node->comment = variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE);
+  }
+}
+
+/**
+ * The node is being cloned for translation.
+ *
+ * This hook can be used to load additional data or copy values from
+ * $node->translation_source.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @return
+ *   None.
+ */
+function hook_nodeapi_prepare_translation($node) {
+}
+
+/**
+ * An RSS feed is being generated.
+ *
+ * The module can return properties to be added to the RSS item generated for
+ * this node. See comment_nodeapi_rss_item() and upload_nodeapi_rss_item() for
+ * examples. The $node passed can also be modified to add or remove contents to
+ * the feed item.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @return
+ *   Extra information to be added to the RSS item.
+ */
+function hook_nodeapi_rss_item($node) {
+  if ($node->comment != COMMENT_NODE_DISABLED) {
+    return array(array('key' => 'comments', 'value' => url('node/' . $node->nid, array('fragment' => 'comments', 'absolute' => TRUE))));
+  }
+  else {
+    return array();
+  }
+}
+
+/**
+ * The node is being displayed as a search result. 
+ *
+ * If you want to display extra information with the result, return it.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @return
+ *   Extra information to be displayed with search result.
+ */
+function hook_nodeapi_search_result($node) {
+  $comments = db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array('nid' => $node->nid))->fetchField();
+  return format_plural($comments, '1 comment', '@count comments');
+}
+
+/**
+ * The node passed validation and is about to be saved.
+ *
+ * Modules may make changes to the node before it is saved to the database.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @return
+ *   None.
+ */
+function hook_nodeapi_presave($node) {
+  if ($node->nid && $node->moderate) {
+    // Reset votes when node is updated:
+    $node->score = 0;
+    $node->users = '';
+    $node->votes = 0;
+  }
+}
+
+/**
+ * The node being updated.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @return
+ *   None.
+ */
+function hook_nodeapi_update($node) {
+  db_query("UPDATE {mytable} SET extra = '%s' WHERE nid = %d", $node->extra, $node->nid);
+}
+
+/**
+ * The node is being indexed.
+ *
+ * If you want additional information to be indexed which is not already
+ * visible through nodeapi "view", then you should return it here.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @return
+ *   Array of additional information to be indexed.
+ */
+function hook_nodeapi_update_index($node) {
+  $text = '';
+  $comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED));
+  foreach ($comments as $comment) {
+    $text .= '<h2>' . check_plain($comment->subject) . '</h2>' . check_markup($comment->comment, $comment->format, FALSE);
+  }
+  return $text;
+}
+
+/**
+ * The user has finished editing the node and is trying to preview or submit it. 
+ *
+ * This hook can be used to check the node data. Errors should be set with 
+ * form_set_error().
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @param $form
+ *   The $form parameter from node_validate().
+ * @return
+ *   None.
+ */
+function hook_nodeapi_validate($node, $form) {
+  if (isset($node->end) && isset($node->start)) {
+    if ($node->start > $node->end) {
+      form_set_error('time', t('An event may not end before it starts.'));
+    }
+  }
+}
+
+/**
+ * The node content is being assembled before rendering. 
+ *
+ * The module may add elements $node->content prior to rendering. This hook 
+ * will be called after hook_view(). The format of $node->content is the 
+ * same as used by Forms API.
+ *
+ * @param $node
+ *   The node the action is being performed on.
+ * @param $teaser
+ *   The $teaser parameter from node_view().
+ * @param $page
+ *   The $page parameter from node_view().
+ * @return
+ *   None.
+ */
+function hook_nodeapi_view($node, $teaser, $page) {
+  $node->content['my_additional_field'] = array(
+    '#value' => theme('mymodule_my_additional_field', $additional_field),
+    '#weight' => 10,
+  );
 }
 
 /**
