Commit 5b52cea9 authored by Dries's avatar Dries
Browse files

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

- Patch #1539608 by cosmicdreams, Rob Loach: Modify comment module to use Dependency Injection for language.
parent 2379c9b9
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment