Commit a5e71d0b authored by tim.plunkett's avatar tim.plunkett

language_default() now returns the object.

parent 3123bd8e
......@@ -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']);
......
......@@ -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,
);
}
......
......@@ -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,
);
}
......
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