From 2afe92050bf59070adf24fa181d1d78031c82b60 Mon Sep 17 00:00:00 2001
From: DjebbZ <khalid.jebbari@gmail.com>
Date: Fri, 26 Aug 2011 14:30:24 +0100
Subject: [PATCH] Fixed wrong parameters in implementation of hook_nodeapi everywhere in core

---
 modules/book/book.module               |    2 +-
 modules/comment/comment.module         |    2 +-
 modules/forum/forum.module             |    2 +-
 modules/path/path.module               |    2 +-
 modules/statistics/statistics.module   |    2 +-
 modules/taxonomy/taxonomy.module       |    2 +-
 modules/translation/translation.module |    2 +-
 modules/trigger/trigger.module         |    2 +-
 modules/upload/upload.module           |    2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/book/book.module b/modules/book/book.module
index 966330b..56f839a 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -649,7 +649,7 @@ function book_build_active_trail($book_link) {
  * Appends book navigation to all nodes in the book, and handles book outline
  * insertions and updates via the node form.
  */
-function book_nodeapi(&$node, $op, $teaser, $page) {
+function book_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   switch ($op) {
     case 'load':
       // Note - we cannot use book_link_load() because it will call node_load()
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 58e9ce6..019769a 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -590,7 +590,7 @@ function comment_form_alter(&$form, $form_state, $form_id) {
 /**
  * Implementation of hook_nodeapi().
  */
-function comment_nodeapi(&$node, $op, $arg = 0) {
+function comment_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
   switch ($op) {
     case 'load':
       return db_fetch_array(db_query("SELECT last_comment_timestamp, last_comment_name, comment_count FROM {node_comment_statistics} WHERE nid = %d", $node->nid));
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 1d8f4a4..1b027f3 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -165,7 +165,7 @@ function forum_init() {
 /**
  * Implementation of hook_nodeapi().
  */
-function forum_nodeapi(&$node, $op, $teaser, $page) {
+function forum_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   // We are going to return if $node->type is not one of the node
   // types assigned to the forum vocabulary.  If forum_nav_vocabulary
   // is undefined or the vocabulary does not exist, it clearly cannot
diff --git a/modules/path/path.module b/modules/path/path.module
index a267fd6..797a95a 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -130,7 +130,7 @@ function path_set_alias($path = NULL, $alias = NULL, $pid = NULL, $language = ''
  * Allows URL aliases for nodes to be specified at node edit time rather
  * than through the administrative interface.
  */
-function path_nodeapi(&$node, $op, $arg) {
+function path_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
   // Permissions are required for everything except node loading.
   if (user_access('create url aliases') || user_access('administer url aliases') || ($op == 'load')) {
     $language = isset($node->language) ? $node->language : '';
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index ba964ef..e06aa3a 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -313,7 +313,7 @@ function _statistics_format_item($title, $path) {
 /**
  * Implementation of hook_nodeapi().
  */
-function statistics_nodeapi(&$node, $op, $arg = 0) {
+function statistics_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
   switch ($op) {
     case 'delete':
       // clean up statistics table when node is deleted
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index eaa6503..34caf0f 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -1195,7 +1195,7 @@ function taxonomy_render_nodes($result) {
 /**
  * Implementation of hook_nodeapi().
  */
-function taxonomy_nodeapi($node, $op, $arg = 0) {
+function taxonomy_nodeapi($node, $op, $a3 = NULL, $a4 = NULL) {
   switch ($op) {
     case 'load':
       $output['taxonomy'] = taxonomy_node_get_terms($node);
diff --git a/modules/translation/translation.module b/modules/translation/translation.module
index a701e1a..cf17cd1 100644
--- a/modules/translation/translation.module
+++ b/modules/translation/translation.module
@@ -180,7 +180,7 @@ function translation_link($type, $node = NULL, $teaser = FALSE) {
  *
  * Manages translation information for nodes.
  */
-function translation_nodeapi(&$node, $op, $teaser, $page) {
+function translation_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   // Only act if we are dealing with a content type supporting translations.
   if (!translation_supported_type($node->type)) {
     return;
diff --git a/modules/trigger/trigger.module b/modules/trigger/trigger.module
index 7c7ff4b..263a2a1 100644
--- a/modules/trigger/trigger.module
+++ b/modules/trigger/trigger.module
@@ -210,7 +210,7 @@ function _trigger_normalize_node_context($type, $node) {
 /**
  * Implementation of hook_nodeapi().
  */
-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.
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 3212ce9..1f82e46 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -272,7 +272,7 @@ function upload_form_alter(&$form, $form_state, $form_id) {
 /**
  * Implementation of hook_nodeapi().
  */
-function upload_nodeapi(&$node, $op, $teaser) {
+function upload_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   switch ($op) {
 
     case 'load':
-- 
1.7.4.1

