summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2011-11-23 11:19:43 (GMT)
committer Gábor Hojtsy2011-11-23 11:19:43 (GMT)
commit52150fe0f3692f249e31d31680abf6a830feab1d (patch)
treecfee3adef5308bfaf8f1d9fdb4cc9fc55df99147
parent6904143ee80069746c821b156883dbbe4bf98870 (diff)
Issue #1260932 by DjebbZ, pwolanin: hook_nodeapi() optional arguments should not be made required by some core modules either
-rw-r--r--modules/book/book.module2
-rw-r--r--modules/forum/forum.module2
-rw-r--r--modules/path/path.module2
-rw-r--r--modules/translation/translation.module2
-rw-r--r--modules/trigger/trigger.module2
-rw-r--r--modules/upload/upload.module2
6 files changed, 6 insertions, 6 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/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..67fabbc 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, $arg = 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/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..3a9e973 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) {
switch ($op) {
case 'load':