From a5e71d0bdfcac95b4d4d3550b161e623693cddd5 Mon Sep 17 00:00:00 2001 From: Tim Plunkett <git@plnktt.com> Date: Tue, 15 May 2012 12:46:04 -0400 Subject: [PATCH] language_default() now returns the object. --- modules/field/views_handler_field_field.inc | 4 ++-- views.api.php | 2 +- views.module | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/field/views_handler_field_field.inc b/modules/field/views_handler_field_field.inc index 2321adcca0db..1823a3b95110 100644 --- a/modules/field/views_handler_field_field.inc +++ b/modules/field/views_handler_field_field.inc @@ -232,7 +232,7 @@ function query($use_groupby = FALSE) { $column = $this->table_alias . '.language'; // By the same reason as field_language the field might be LANGUAGE_NOT_SPECIFIED in reality so allow it as well. // @see this::field_language() - $default_language = language_default('language'); + $default_language = language_default()->langcode; $language = str_replace(array('***CURRENT_LANGUAGE***', '***DEFAULT_LANGUAGE***'), array(drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode, $default_language), $this->view->display_handler->options['field_language']); @@ -889,7 +889,7 @@ function add_self_tokens(&$tokens, $item) { */ function field_language($entity_type, $entity) { if (field_is_translatable($entity_type, $this->field_info)) { - $default_language = language_default('language'); + $default_language = language_default()->langcode; $language = str_replace(array('***CURRENT_LANGUAGE***', '***DEFAULT_LANGUAGE***'), array(drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode, $default_language), $this->view->display_handler->options['field_language']); diff --git a/views.api.php b/views.api.php index e100871e0c32..3f83cae2f49d 100644 --- a/views.api.php +++ b/views.api.php @@ -773,7 +773,7 @@ function hook_views_query_substitutions($view) { '***CURRENT_VERSION***' => VERSION, '***CURRENT_TIME***' => REQUEST_TIME, '***CURRENT_LANGUAGE***' => drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode, - '***DEFAULT_LANGUAGE***' => language_default('language'), + '***DEFAULT_LANGUAGE***' => language_default()->langcode, ); } diff --git a/views.module b/views.module index 01d9f11697f8..350d7356a709 100644 --- a/views.module +++ b/views.module @@ -2025,7 +2025,7 @@ function views_views_query_substitutions($view) { '***CURRENT_VERSION***' => VERSION, '***CURRENT_TIME***' => REQUEST_TIME, '***CURRENT_LANGUAGE***' => drupal_container()->get(LANGUAGE_TYPE_CONTENT)->langcode, - '***DEFAULT_LANGUAGE***' => language_default('language'), + '***DEFAULT_LANGUAGE***' => language_default()->langcode, ); } -- GitLab