Issue #1631092 by webflo: Remove language related todos and global variables from boostrap.inc.
parent
b49c71cb34
commit
82f095ad2e
|
@ -2617,13 +2617,6 @@ function drupal_language_initialize() {
|
||||||
->addMethodCall('extend', array($default));
|
->addMethodCall('extend', array($default));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo Temporary backwards compatibility for code still using globals.
|
|
||||||
// Remove after these issues:
|
|
||||||
// - $language_url: http://drupal.org/node/1512310
|
|
||||||
foreach ($types as $type) {
|
|
||||||
$GLOBALS[$type] = $container->get($type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -880,7 +880,7 @@ function block_block_list_alter(&$blocks) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
foreach ($block_langcodes[$block->module][$block->delta] as $language_type => $langcodes) {
|
foreach ($block_langcodes[$block->module][$block->delta] as $language_type => $langcodes) {
|
||||||
if (isset($langcodes[$GLOBALS[$language_type]->langcode])) {
|
if (isset($langcodes[drupal_container()->get($language_type)->langcode])) {
|
||||||
// Found a language type - langcode combination in the configuration
|
// Found a language type - langcode combination in the configuration
|
||||||
// that is applicable to the current request.
|
// that is applicable to the current request.
|
||||||
continue 2;
|
continue 2;
|
||||||
|
|
|
@ -1132,7 +1132,7 @@ function node_revision_delete($revision_id) {
|
||||||
*/
|
*/
|
||||||
function node_view(Node $node, $view_mode = 'full', $langcode = NULL) {
|
function node_view(Node $node, $view_mode = 'full', $langcode = NULL) {
|
||||||
if (!isset($langcode)) {
|
if (!isset($langcode)) {
|
||||||
$langcode = $GLOBALS['language_content']->langcode;
|
$langcode = drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Populate $node->content with a render() array.
|
// Populate $node->content with a render() array.
|
||||||
|
@ -1194,7 +1194,7 @@ function node_view(Node $node, $view_mode = 'full', $langcode = NULL) {
|
||||||
*/
|
*/
|
||||||
function node_build_content(Node $node, $view_mode = 'full', $langcode = NULL) {
|
function node_build_content(Node $node, $view_mode = 'full', $langcode = NULL) {
|
||||||
if (!isset($langcode)) {
|
if (!isset($langcode)) {
|
||||||
$langcode = $GLOBALS['language_content']->langcode;
|
$langcode = drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove previously built content, if exists.
|
// Remove previously built content, if exists.
|
||||||
|
|
|
@ -584,7 +584,7 @@ function taxonomy_term_delete_multiple(array $tids) {
|
||||||
*/
|
*/
|
||||||
function taxonomy_term_view(Term $term, $view_mode = 'full', $langcode = NULL) {
|
function taxonomy_term_view(Term $term, $view_mode = 'full', $langcode = NULL) {
|
||||||
if (!isset($langcode)) {
|
if (!isset($langcode)) {
|
||||||
$langcode = $GLOBALS['language_content']->langcode;
|
$langcode = drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
field_attach_prepare_view('taxonomy_term', array($term->tid => $term), $view_mode, $langcode);
|
field_attach_prepare_view('taxonomy_term', array($term->tid => $term), $view_mode, $langcode);
|
||||||
|
|
|
@ -2367,7 +2367,7 @@ function user_view_page($account) {
|
||||||
*/
|
*/
|
||||||
function user_view($account, $view_mode = 'full', $langcode = NULL) {
|
function user_view($account, $view_mode = 'full', $langcode = NULL) {
|
||||||
if (!isset($langcode)) {
|
if (!isset($langcode)) {
|
||||||
$langcode = $GLOBALS['language_content']->langcode;
|
$langcode = drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve all profile fields and attach to $account->content.
|
// Retrieve all profile fields and attach to $account->content.
|
||||||
|
@ -2404,7 +2404,7 @@ function user_view($account, $view_mode = 'full', $langcode = NULL) {
|
||||||
*/
|
*/
|
||||||
function user_build_content($account, $view_mode = 'full', $langcode = NULL) {
|
function user_build_content($account, $view_mode = 'full', $langcode = NULL) {
|
||||||
if (!isset($langcode)) {
|
if (!isset($langcode)) {
|
||||||
$langcode = $GLOBALS['language_content']->langcode;
|
$langcode = drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove previously built content, if exists.
|
// Remove previously built content, if exists.
|
||||||
|
|
Loading…
Reference in New Issue