Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
og
Commits
fad3becd
Commit
fad3becd
authored
Jun 19, 2018
by
jacob.embree
Committed by
alesr
Jun 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1865860
Issues with multiple entity types as groups.
parent
d16275a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
og.module
og.module
+9
-1
No files found.
og.module
View file @
fad3becd
...
...
@@ -671,7 +671,15 @@ function og_field_create_instance($instance) {
$og_field
=
og_fields_info
(
OG_AUDIENCE_FIELD
);
$og_field
[
'field'
][
'settings'
][
'target_type'
]
=
$entity_type
;
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
// instance to all of them.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment