diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-12-09 11:30:25 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-12-09 11:30:25 +0000 |
commit | c0cb68abccfa5daa442ad3deb410b81c7da7a52b (patch) | |
tree | 81b7674938d4407a487b6d9735f2a30cf26a6380 /modules/comment/comment.module | |
parent | 7c30a1bac9ce4843178203040306c7ffd4dbc20c (diff) | |
download | brdo-c0cb68abccfa5daa442ad3deb410b81c7da7a52b.tar.gz brdo-c0cb68abccfa5daa442ad3deb410b81c7da7a52b.tar.bz2 |
- Patch #319356 by recidive: clean up hook_nodeapi_ fucntion signatures and documentation because of previous node API clean-ups.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 759bcc9f3..96fd3680b 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -610,7 +610,7 @@ function comment_nodeapi_load($nodes, $types) { /** * 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); } @@ -619,7 +619,7 @@ function comment_nodeapi_prepare(&$node, $arg = 0) { /** * 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, @@ -633,7 +633,7 @@ function comment_nodeapi_insert(&$node, $arg = 0) { /** * 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(); @@ -645,7 +645,7 @@ function comment_nodeapi_delete(&$node, $arg = 0) { /** * 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) { @@ -657,7 +657,7 @@ function comment_nodeapi_update_index(&$node, $arg = 0) { /** * 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'); } @@ -665,7 +665,7 @@ function comment_nodeapi_search_result(&$node, $arg = 0) { /** * 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)))); } |