- Patch #1539608 by cosmicdreams, Rob Loach: Modify comment module to use Dependency Injection for language.

8.0.x
Dries 2012-05-18 16:42:40 -04:00
parent 2379c9b95b
commit 5b52cea97d
1 changed files with 2 additions and 2 deletions

View File

@ -949,7 +949,7 @@ function comment_prepare_thread(&$comments) {
*/
function comment_view(Comment $comment, Node $node, $view_mode = 'full', $langcode = NULL) {
if (!isset($langcode)) {
$langcode = $GLOBALS['language_content']->langcode;
$langcode = drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode;
}
// Populate $comment->content with a render() array.
@ -1016,7 +1016,7 @@ function comment_view(Comment $comment, Node $node, $view_mode = 'full', $langco
*/
function comment_build_content(Comment $comment, Node $node, $view_mode = 'full', $langcode = NULL) {
if (!isset($langcode)) {
$langcode = $GLOBALS['language_content']->langcode;
$langcode = drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode;
}
// Remove previously built content, if exists.