diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment/comment.api.php | 14 |
1 files 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']); } /** |