Commit fad3becd authored by jacob.embree's avatar jacob.embree Committed by alesr

#1865860 Issues with multiple entity types as groups.

parent d16275a0
...@@ -671,7 +671,15 @@ function og_field_create_instance($instance) { ...@@ -671,7 +671,15 @@ function og_field_create_instance($instance) {
$og_field = og_fields_info(OG_AUDIENCE_FIELD); $og_field = og_fields_info(OG_AUDIENCE_FIELD);
$og_field['field']['settings']['target_type'] = $entity_type; $og_field['field']['settings']['target_type'] = $entity_type;
$og_field['instance']['label'] = t('Group membership'); if ($entity_type == 'node') {
$og_field['instance']['label'] = t('Group membership');
}
else {
$entity_info = entity_get_info($entity_type);
$og_field['instance']['label'] = t('@label group membership', array(
'@label' => $entity_info['label'],
));
}
// If the user entity type has multiple bundles, make sure to attach a field // If the user entity type has multiple bundles, make sure to attach a field
// instance to all of them. // instance to all of them.
......
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