summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2012-11-06 01:59:01 -0500
committerDavid Rothstein <drothstein@gmail.com>2012-11-06 01:59:01 -0500
commit6e344fd49cdaf55a21f1ff16bb312dcc897fbb78 (patch)
tree6791c741a95e9ef9cc7acb03cb85d9403668fc1a /modules/comment
parent6b11350d32b753a45f4814325bdcd8aafd163050 (diff)
downloadbrdo-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')
-rw-r--r--modules/comment/comment.module4
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);
}
/**