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

LANGUAGE_NONE was renamed to LANGUAGE_NOT_SPECIFIED.

parent e112da07
......@@ -230,7 +230,7 @@ function query($use_groupby = FALSE) {
$field = $this->field_info;
if (field_is_translatable($entity_type, $field) && !empty($this->view->display_handler->options['field_language_add_to_query'])) {
$column = $this->table_alias . '.language';
// By the same reason as field_language the field might be LANGUAGE_NONE in reality so allow it as well.
// 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');
$language = str_replace(array('***CURRENT_LANGUAGE***', '***DEFAULT_LANGUAGE***'),
......@@ -243,7 +243,7 @@ function query($use_groupby = FALSE) {
$language_fallback_candidates = array_merge($language_fallback_candidates, language_fallback_get_candidates());
}
else {
$language_fallback_candidates[] = LANGUAGE_NONE;
$language_fallback_candidates[] = LANGUAGE_NOT_SPECIFIED;
}
$this->query->add_where_expression(0, "$column IN($placeholder) OR $column IS NULL", array($placeholder => $language_fallback_candidates));
}
......@@ -895,7 +895,7 @@ function field_language($entity_type, $entity) {
$this->view->display_handler->options['field_language']);
// Give the Field Language API a chance to fallback to a different language
// (or LANGUAGE_NONE), in case the field has no data for the selected language.
// (or LANGUAGE_NOT_SPECIFIED), in case the field has no data for the selected language.
// field_view_field() does this as well, but since the returned language code
// is used before calling it, the fallback needs to happen explicitly.
$language = field_language($entity_type, $entity, $this->field_info['field_name'], $language);
......@@ -903,7 +903,7 @@ function field_language($entity_type, $entity) {
return $language;
}
else {
return LANGUAGE_NONE;
return LANGUAGE_NOT_SPECIFIED;
}
}
}
......@@ -17,7 +17,7 @@ function get_value_options() {
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NONE => t('No language')
LANGUAGE_NOT_SPECIFIED => t('No language')
);
$languages = array_merge($languages, views_language_list());
$this->value_options = $languages;
......
......@@ -17,7 +17,7 @@ function get_value_options() {
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NONE => t('No language')
LANGUAGE_NOT_SPECIFIED => t('No language')
);
$languages = array_merge($languages, views_language_list());
$this->value_options = $languages;
......
......@@ -1252,7 +1252,7 @@ function options_summary(&$categories, &$options) {
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NONE => t('Language neutral'),
LANGUAGE_NOT_SPECIFIED => t('Language neutral'),
);
if (module_exists('locale')) {
$languages = array_merge($languages, locale_language_list());
......@@ -1635,7 +1635,7 @@ function options_form(&$form, &$form_state) {
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NONE => t('Language neutral'),
LANGUAGE_NOT_SPECIFIED => t('Language neutral'),
);
$languages = array_merge($languages, views_language_list());
......
......@@ -115,7 +115,7 @@ class viewsFieldApiDataTest extends ViewsFieldApiTestHelper {
function setUp() {
parent::setUp();
$langcode = LANGUAGE_NONE;
$langcode = LANGUAGE_NOT_SPECIFIED;
$field_names = $this->setUpFields();
......@@ -310,10 +310,10 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper {
for ($key = 0; $key < 3; $key++) {
$field = $this->fields[$key];
$edit[$field['field_name']][LANGUAGE_NONE][0]['value'] = $this->randomName(8);
$edit[$field['field_name']][LANGUAGE_NOT_SPECIFIED][0]['value'] = $this->randomName(8);
}
for ($j = 0; $j < 5; $j++) {
$edit[$this->fields[3]['field_name']][LANGUAGE_NONE][$j]['value'] = $this->randomName(8);
$edit[$this->fields[3]['field_name']][LANGUAGE_NOT_SPECIFIED][$j]['value'] = $this->randomName(8);
}
$this->nodes[$i] = $this->drupalCreateNode($edit);
......@@ -335,7 +335,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper {
for ($key = 0; $key < 2; $key++) {
$field = $this->fields[$key];
$rendered_field = $view->style_plugin->get_field($i, $field['field_name']);
$expected_field = $this->nodes[$i]->{$field['field_name']}[LANGUAGE_NONE][0]['value'];
$expected_field = $this->nodes[$i]->{$field['field_name']}[LANGUAGE_NOT_SPECIFIED][0]['value'];
$this->assertEqual($rendered_field, $expected_field);
}
}
......@@ -371,7 +371,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper {
for ($i = 0; $i < 3; $i++) {
$rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']);
$items = array();
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE];
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NOT_SPECIFIED];
$pure_items = array_splice($pure_items, 0, 3);
foreach ($pure_items as $j => $item) {
$items[] = $pure_items[$j]['value'];
......@@ -389,7 +389,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper {
for ($i = 0; $i < 3; $i++) {
$rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']);
$items = array();
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE];
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NOT_SPECIFIED];
$pure_items = array_splice($pure_items, 1, 3);
foreach ($pure_items as $j => $item) {
$items[] = $pure_items[$j]['value'];
......@@ -408,7 +408,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper {
for ($i = 0; $i < 3; $i++) {
$rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']);
$items = array();
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE];
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NOT_SPECIFIED];
array_splice($pure_items, 0, -3);
$pure_items = array_reverse($pure_items);
foreach ($pure_items as $j => $item) {
......@@ -428,7 +428,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper {
for ($i = 0; $i < 3; $i++) {
$rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']);
$items = array();
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE];
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NOT_SPECIFIED];
$items[] = $pure_items[0]['value'];
$items[] = $pure_items[4]['value'];
$this->assertEqual($rendered_field, implode(', ', $items), 'Take sure that the amount of items are limited.');
......@@ -445,7 +445,7 @@ class viewsHandlerFieldFieldTest extends ViewsFieldApiTestHelper {
for ($i = 0; $i < 3; $i++) {
$rendered_field = $view->style_plugin->get_field($i, $this->fields[3]['field_name']);
$items = array();
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NONE];
$pure_items = $this->nodes[$i]->{$this->fields[3]['field_name']}[LANGUAGE_NOT_SPECIFIED];
$pure_items = array_splice($pure_items, 0, 3);
foreach ($pure_items as $j => $item) {
$items[] = $pure_items[$j]['value'];
......
......@@ -336,7 +336,7 @@ class ViewsUIWizardTaggedWithTestCase extends ViewsUIWizardHelper {
$node_add_path = 'node/add/' . $this->node_type_with_tags->type;
// Create three nodes, with different tags.
$tag_field = $this->tag_field['field_name'] . '[' . LANGUAGE_NONE . ']';
$tag_field = $this->tag_field['field_name'] . '[' . LANGUAGE_NOT_SPECIFIED . ']';
$edit = array();
$edit['title'] = $node_tag1_title = $this->randomName();
$edit[$tag_field] = 'tag1';
......@@ -733,8 +733,8 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper {
'uid' => 0,
'status' => COMMENT_PUBLISHED,
'subject' => $this->randomName(),
'language' => LANGUAGE_NONE,
'comment_body' => array(LANGUAGE_NONE => array($this->randomName())),
'language' => LANGUAGE_NOT_SPECIFIED,
'comment_body' => array(LANGUAGE_NOT_SPECIFIED => array($this->randomName())),
);
comment_save($comment);
return entity_uri('comment', $comment);
......
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