diff --git a/modules/field/field.info.class.inc b/modules/field/field.info.class.inc index 80a6630..de50a1b 100644 --- a/modules/field/field.info.class.inc +++ b/modules/field/field.info.class.inc @@ -138,7 +138,7 @@ class FieldInfo { $map = array(); - $query = db_query('SELECT fc.type, fci.field_name, fci.entity_type, fci.bundle FROM {field_config_instance} fci LEFT JOIN {field_config} fc ON fc.id = fci.field_id WHERE fc.active = 1 AND fc.storage_active = 1 AND fc.deleted = 0 AND fci.deleted = 0'); + $query = db_query('SELECT fc.type, fci.field_name, fci.entity_type, fci.bundle FROM {field_config_instance} fci INNER JOIN {field_config} fc ON fc.id = fci.field_id WHERE fc.active = 1 AND fc.storage_active = 1 AND fc.deleted = 0 AND fci.deleted = 0'); foreach ($query as $row) { $map[$row->field_name]['bundles'][$row->entity_type][] = $row->bundle; $map[$row->field_name]['type'] = $row->type; @@ -217,7 +217,7 @@ class FieldInfo { // Initialize empty arrays for all existing entity types and bundles. // This is not strictly needed, but is done to preserve the behavior of - // field_info_instances() before http://drupal.org/node/1040790. + // field_info_instances() before http://drupal.org/node/1880666. foreach (field_info_bundles() as $existing_entity_type => $bundles) { foreach ($bundles as $bundle => $bundle_info) { $this->bundleInstances[$existing_entity_type][$bundle] = array(); diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc index 1b74b46..7711395 100644 --- a/modules/field/field.info.inc +++ b/modules/field/field.info.inc @@ -68,7 +68,7 @@ function field_info_cache_clear() { * * Deprecated. This function is kept to ensure backwards compatibility, but has * a serious performance impact, and should be absolutely avoided. - * See http://drupal.org/node/1040790. + * See http://drupal.org/node/1880666. * * Use the regular field_info_*() API functions to access the information, or * field_info_cache_clear() to clear the cached data. @@ -234,7 +234,7 @@ function _field_info_collate_types($reset = FALSE) { * Prepares a field definition for the current run-time context. * * The functionality has moved to the FieldInfo class. This function is kept as - * a backwards-compatibility layer. See http://drupal.org/node/1040790. + * a backwards-compatibility layer. See http://drupal.org/node/1880666. * * @see FieldInfo::prepareField() */ @@ -247,7 +247,7 @@ function _field_info_prepare_field($field) { * Prepares an instance definition for the current run-time context. * * The functionality has moved to the FieldInfo class. This function is kept as - * a backwards-compatibility layer. See http://drupal.org/node/1040790. + * a backwards-compatibility layer. See http://drupal.org/node/1880666. * * @see FieldInfo::prepareInstance() */ @@ -260,7 +260,7 @@ function _field_info_prepare_instance($instance, $field) { * Adapts display specifications to the current run-time context. * * The functionality has moved to the FieldInfo class. This function is kept as - * a backwards-compatibility layer. See http://drupal.org/node/1040790. + * a backwards-compatibility layer. See http://drupal.org/node/1880666. * * @see FieldInfo::prepareInstanceDisplay() */ @@ -273,7 +273,7 @@ function _field_info_prepare_instance_display($field, $display) { * Prepares widget specifications for the current run-time context. * * The functionality has moved to the FieldInfo class. This function is kept as - * a backwards-compatibility layer. See http://drupal.org/node/1040790. + * a backwards-compatibility layer. See http://drupal.org/node/1880666. * * @see FieldInfo::prepareInstanceWidget() */ @@ -286,7 +286,7 @@ function _field_info_prepare_instance_widget($field, $widget) { * Prepares 'extra fields' for the current run-time context. * * The functionality has moved to the FieldInfo class. This function is kept as - * a backwards-compatibility layer. See http://drupal.org/node/1040790. + * a backwards-compatibility layer. See http://drupal.org/node/1880666. * * @see FieldInfo::prepareExtraFields() */ diff --git a/modules/field/tests/field.test b/modules/field/tests/field.test index b563136..9cd8535 100644 --- a/modules/field/tests/field.test +++ b/modules/field/tests/field.test @@ -1375,7 +1375,7 @@ class FieldInfoTestCase extends FieldTestCase { ); field_create_field($field); $fields = field_info_fields(); - $this->assertTrue(isset($fields[$field_name]), t('The test field is initially found in the array returned by field_info_fields().')); + $this->assertTrue(isset($fields[$field_name]), 'The test field is initially found in the array returned by field_info_fields().'); // Now rebuild the field info cache, and set a variable which will cause // the cache to be cleared while it's being rebuilt; see @@ -1384,7 +1384,7 @@ class FieldInfoTestCase extends FieldTestCase { field_info_cache_clear(); variable_set('field_test_clear_info_cache_in_hook_entity_info', TRUE); $fields = field_info_fields(); - $this->assertTrue(isset($fields[$field_name]), t('The test field is found in the array returned by field_info_fields() even if its cache is cleared while being rebuilt.')); + $this->assertTrue(isset($fields[$field_name]), 'The test field is found in the array returned by field_info_fields() even if its cache is cleared while being rebuilt.'); } } @@ -2299,11 +2299,11 @@ class FieldCrudTestCase extends FieldTestCase { // Check that 'single column' criteria works. $fields = field_read_fields(array('field_name' => $field_definition['field_name'])); - $this->assertTrue(count($fields) == 1 && isset($fields[$field_definition['field_name']]), t('The field was properly read.')); + $this->assertTrue(count($fields) == 1 && isset($fields[$field_definition['field_name']]), 'The field was properly read.'); // Check that 'multi column' criteria works. $fields = field_read_fields(array('field_name' => $field_definition['field_name'], 'type' => $field_definition['type'])); - $this->assertTrue(count($fields) == 1 && isset($fields[$field_definition['field_name']]), t('The field was properly read.')); + $this->assertTrue(count($fields) == 1 && isset($fields[$field_definition['field_name']]), 'The field was properly read.'); $fields = field_read_fields(array('field_name' => $field_definition['field_name'], 'type' => 'foo')); $this->assertTrue(empty($fields), 'No field was found.'); @@ -2317,9 +2317,9 @@ class FieldCrudTestCase extends FieldTestCase { // Check that criteria spanning over the field_config_instance table work. $fields = field_read_fields(array('entity_type' => $instance_definition['entity_type'], 'bundle' => $instance_definition['bundle'])); - $this->assertTrue(count($fields) == 1 && isset($fields[$field_definition['field_name']]), t('The field was properly read.')); + $this->assertTrue(count($fields) == 1 && isset($fields[$field_definition['field_name']]), 'The field was properly read.'); $fields = field_read_fields(array('entity_type' => $instance_definition['entity_type'], 'field_name' => $instance_definition['field_name'])); - $this->assertTrue(count($fields) == 1 && isset($fields[$field_definition['field_name']]), t('The field was properly read.')); + $this->assertTrue(count($fields) == 1 && isset($fields[$field_definition['field_name']]), 'The field was properly read.'); } /**