Commit 9dee6f61 authored by catch's avatar catch
Browse files

Issue #1539626 by cosmicdreams: Modify node module to use dependency injection for language.

parent 8780ba25
......@@ -687,7 +687,7 @@ function node_type_update_nodes($old_type, $type) {
* type object by $type->disabled being set to TRUE.
*/
function _node_types_build($rebuild = FALSE) {
$cid = 'node_types:' . $GLOBALS['language_interface']->langcode;
$cid = 'node_types:' . drupal_container()->get(LANGUAGE_TYPE_INTERFACE)->langcode;
if (!$rebuild) {
$_node_types = &drupal_static(__FUNCTION__);
......
......@@ -2278,7 +2278,7 @@ class NodeTokenReplaceTestCase extends NodeWebTestCase {
* Creates a node, then tests the tokens generated from it.
*/
function testNodeTokenReplacement() {
global $language_interface;
$language_interface = drupal_container()->get(LANGUAGE_TYPE_INTERFACE);
$url_options = array(
'absolute' => TRUE,
'language' => $language_interface,
......
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