diff options
author | David Rothstein <drothstein@gmail.com> | 2012-11-06 01:59:01 -0500 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2012-11-06 01:59:01 -0500 |
commit | 6e344fd49cdaf55a21f1ff16bb312dcc897fbb78 (patch) | |
tree | 6791c741a95e9ef9cc7acb03cb85d9403668fc1a /modules/comment/comment.module | |
parent | 6b11350d32b753a45f4814325bdcd8aafd163050 (diff) | |
download | brdo-6e344fd49cdaf55a21f1ff16bb312dcc897fbb78.tar.gz brdo-6e344fd49cdaf55a21f1ff16bb312dcc897fbb78.tar.bz2 |
Issue #1154382 followup by plach: Fixed several issues with the newly-added hook_entity_view_mode_alter().
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 05bc7aa2b..4241538a0 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1021,6 +1021,10 @@ function comment_build_content($comment, $node, $view_mode = 'full', $langcode = // Allow modules to make their own additions to the comment. module_invoke_all('comment_view', $comment, $view_mode, $langcode); module_invoke_all('entity_view', $comment, 'comment', $view_mode, $langcode); + + // Make sure the current view mode is stored if no module has already + // populated the related key. + $comment->content += array('#view_mode' => $view_mode); } /** |