diff options
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 441c90dac..e3dc798b1 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -426,7 +426,7 @@ function comment_get_recent($number = 10) { * @return * "page=X" if the page number is greater than zero; empty string otherwise. */ -function comment_new_page_count($num_comments, $new_replies, $node) { +function comment_new_page_count($num_comments, $new_replies, stdClass $node) { $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED); $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50); $pagenum = NULL; @@ -486,7 +486,7 @@ function theme_comment_block() { /** * Implement hook_node_view(). */ -function comment_node_view($node, $build_mode) { +function comment_node_view(stdClass $node, $build_mode) { $links = array(); if ($node->comment) { @@ -592,7 +592,7 @@ function comment_node_view($node, $build_mode) { * @param $node * A node object. */ -function comment_node_page_additions($node) { +function comment_node_page_additions(stdClass $node) { $additions = array(); // Only attempt to render comments if the node has visible comments. @@ -693,7 +693,7 @@ function comment_node_page_additions($node) { * spoil the reverse ordering, "ORDER BY thread ASC" -- here, we do not need * to consider the trailing "/" so we use a substring only. */ -function comment_get_thread($node, $mode, $comments_per_page) { +function comment_get_thread(stdClass $node, $mode, $comments_per_page) { $query = db_select('comment', 'c')->extend('PagerDefault'); $query->addField('c', 'cid'); $query @@ -783,7 +783,7 @@ function comment_prepare_thread(&$comments) { * @return * An array as expected by drupal_render(). */ -function comment_build($comment, $node, $build_mode = 'full') { +function comment_build($comment, stdClass $node, $build_mode = 'full') { // Populate $comment->content with a render() array. comment_build_content($comment, $node, $build_mode); @@ -838,7 +838,7 @@ function comment_build($comment, $node, $build_mode = 'full') { * @param $build_mode * Build mode, e.g. 'full', 'teaser'... */ -function comment_build_content($comment, $node, $build_mode = 'full') { +function comment_build_content($comment, stdClass $node, $build_mode = 'full') { if (empty($comment->content)) { $comment->content = array(); } @@ -878,7 +878,7 @@ function comment_build_content($comment, $node, $build_mode = 'full') { * @return * A structured array of links. */ -function comment_links($comment, $node) { +function comment_links($comment, stdClass $node) { $links = array(); if ($node->comment == COMMENT_NODE_OPEN) { if (user_access('administer comments') && user_access('post comments')) { @@ -941,7 +941,7 @@ function comment_links($comment, $node) { * @return * An array in the format expected by drupal_render(). */ -function comment_build_multiple($comments, $node, $build_mode = 'full', $weight = 0) { +function comment_build_multiple($comments, stdClass $node, $build_mode = 'full', $weight = 0) { field_attach_prepare_view('comment', $comments, $build_mode); $build = array( @@ -1127,7 +1127,7 @@ function comment_node_load($nodes, $types) { /** * Implement hook_node_prepare(). */ -function comment_node_prepare($node) { +function comment_node_prepare(stdClass $node) { if (!isset($node->comment)) { $node->comment = variable_get("comment_$node->type", COMMENT_NODE_OPEN); } @@ -1136,7 +1136,7 @@ function comment_node_prepare($node) { /** * Implement hook_node_insert(). */ -function comment_node_insert($node) { +function comment_node_insert(stdClass $node) { db_insert('node_comment_statistics') ->fields(array( 'nid' => $node->nid, @@ -1151,7 +1151,7 @@ function comment_node_insert($node) { /** * Implement hook_node_delete(). */ -function comment_node_delete($node) { +function comment_node_delete(stdClass $node) { $cids = db_query('SELECT cid FROM {comment} WHERE nid = :nid', array(':nid' => $node->nid))->fetchCol(); comment_delete_multiple($cids); db_delete('node_comment_statistics') @@ -1162,7 +1162,7 @@ function comment_node_delete($node) { /** * Implement hook_node_update_index(). */ -function comment_node_update_index($node) { +function comment_node_update_index(stdClass $node) { $text = ''; if ($node->comment != COMMENT_NODE_HIDDEN) { $comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array( @@ -1187,7 +1187,7 @@ function comment_update_index() { /** * Implement hook_node_search_result(). */ -function comment_node_search_result($node) { +function comment_node_search_result(stdClass $node) { if ($node->comment != COMMENT_NODE_HIDDEN) { $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'); |