diff --git a/og_context/og_context.module b/og_context/og_context.module index 47df9b0f47ad1ece759362e260ee31189975a90a..ea730218c7ab5c1ac1d16eb3251a97e69c0f5c95 100644 --- a/og_context/og_context.module +++ b/og_context/og_context.module @@ -640,7 +640,7 @@ function _group_context_handler_entity($entity_type = 'node', $entity = NULL, $p } // Check if the entity is itself a group. - if ($group = og_is_group($entity_type, $id)) { + if (og_is_group($entity_type, $entity)) { $contexts[$entity_type][] = $id; } elseif ($gids = og_get_entity_groups($entity_type, $entity)) { diff --git a/og_ui/og_ui.module b/og_ui/og_ui.module index 060b02406ef121a7a64487a36a082de35ec18702..bac58c127d80175baf5afb2fec42485f69ceb36d 100644 --- a/og_ui/og_ui.module +++ b/og_ui/og_ui.module @@ -333,7 +333,7 @@ function og_ui_user_access_group($perm, $group_type, $gid) { // Not a valid entity type. return FALSE; } - return og_is_group($group_type, $gid) && og_user_access($group_type, $gid, $perm); + return og_is_group($group_type, $group) && og_user_access($group_type, $gid, $perm); } /**