From c59e50aa6dc5fcbdcb0d7e50f2a7c53c2f39c852 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 13 Mar 2009 14:32:07 +0000 Subject: - Patch #314138 by jeffschuler: documentation improvements. --- modules/comment/comment.api.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/comment/comment.api.php b/modules/comment/comment.api.php index 377be4786..df2edb30e 100644 --- a/modules/comment/comment.api.php +++ b/modules/comment/comment.api.php @@ -19,10 +19,9 @@ * @return * Nothing. */ -function hook_comment_insert(&$form_values) { - $nid = $form_values['nid']; - - cache_clear_all_like(drupal_url(array('id' => $nid))); +function hook_comment_insert($form_values) { + // Reindex the node when comments are added. + search_touch_node($form_values['nid']); } /** @@ -50,10 +49,9 @@ function hook_comment_validate(&$form_values) { * @return * Nothing. */ -function hook_comment_update(&$form_values) { - $nid = $form_values['nid']; - - cache_clear_all_like(drupal_url(array('id' => $nid))); +function hook_comment_update($form_values) { + // Reindex the node when comments are updated. + search_touch_node($form_values['nid']); } /** -- cgit v1.2.3