| 1 |
<?php |
<?php |
| 2 |
// $Id: comment.module,v 1.800 2009/11/03 06:47:22 webchick Exp $ |
// $Id: comment.module,v 1.801 2009/11/06 03:59:06 webchick Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 794 |
'#node' => $node, |
'#node' => $node, |
| 795 |
'#build_mode' => $build_mode, |
'#build_mode' => $build_mode, |
| 796 |
); |
); |
|
// Add contextual links for this comment. |
|
|
$build['#contextual_links']['comment'] = menu_contextual_links('comment', array($comment->cid)); |
|
| 797 |
|
|
| 798 |
$prefix = ''; |
$prefix = ''; |
| 799 |
$is_threaded = isset($comment->divs) && variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED) == COMMENT_MODE_THREADED; |
$is_threaded = isset($comment->divs) && variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED) == COMMENT_MODE_THREADED; |
| 817 |
$build['#suffix'] = str_repeat('</div>', $comment->divs_final); |
$build['#suffix'] = str_repeat('</div>', $comment->divs_final); |
| 818 |
} |
} |
| 819 |
|
|
| 820 |
|
// Allow modules to modify the structured comment. |
| 821 |
|
drupal_alter('comment_build', $build); |
| 822 |
|
|
| 823 |
return $build; |
return $build; |
| 824 |
} |
} |
| 825 |
|
|
| 845 |
'#markup' => check_markup($comment->comment, $comment->format, '', TRUE), |
'#markup' => check_markup($comment->comment, $comment->format, '', TRUE), |
| 846 |
); |
); |
| 847 |
|
|
| 848 |
|
// Build fields content. |
| 849 |
field_attach_prepare_view('comment', array($comment->cid => $comment), $build_mode); |
field_attach_prepare_view('comment', array($comment->cid => $comment), $build_mode); |
| 850 |
$comment->content += field_attach_view('comment', $comment, $build_mode); |
$comment->content += field_attach_view('comment', $comment, $build_mode); |
| 851 |
|
|
| 859 |
|
|
| 860 |
// Allow modules to make their own additions to the comment. |
// Allow modules to make their own additions to the comment. |
| 861 |
module_invoke_all('comment_view', $comment, $build_mode); |
module_invoke_all('comment_view', $comment, $build_mode); |
|
|
|
|
// Allow modules to modify the structured comment. |
|
|
drupal_alter('comment_build', $comment, $build_mode); |
|
| 862 |
} |
} |
| 863 |
|
|
| 864 |
/** |
/** |