Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
og
Commits
b349cc41
Commit
b349cc41
authored
Apr 02, 2014
by
amitaibu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2231217
by Amitaibu: Prevent loading entity in \OgMembership::save() upon og_group().
parent
bede7c00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
includes/og.membership.inc
includes/og.membership.inc
+2
-2
og.module
og.module
+3
-0
No files found.
includes/og.membership.inc
View file @
b349cc41
...
...
@@ -23,8 +23,8 @@ class OgMembership extends Entity {
throw
new
OgException
(
'OG membership can not be created for anonymous user.'
);
}
$
wrapper
=
entity_metadata_wrapper
(
$entity_type
,
$etid
);
$bundle
=
$wrapper
->
getBundle
(
);
$
entity
=
!
empty
(
$this
->
entity
)
?
$this
->
entity
:
entity_load_single
(
$entity_type
,
$etid
);
list
(,,
$bundle
)
=
entity_extract_ids
(
$entity_type
,
$entity
);
$group_type
=
$this
->
group_type
;
$gid
=
$this
->
gid
;
...
...
og.module
View file @
b349cc41
...
...
@@ -2017,6 +2017,9 @@ function og_group($group_type, $gid, $values = array(), $save_created = TRUE) {
}
if
(
empty
(
$og_membership
->
is_new
)
||
$save_created
)
{
// Pass the entity object along to OgMembership::save() so we don't have
// to reload it.
$og_membership
->
entity
=
$entity
;
// Save the membership for update, or if the OG membership is new when
// "save-created" is TRUE.
$og_membership
->
save
();
...
...
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