By joachim on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
7.x-2.x
Introduced in version:
7.x-2.7
Issue links:
Description:
The function og_context_determine_context() has been deprecated. It will continue to work as before, but its use should be replaced with og_context_determine_context_info().
This is because og_context_determine_context() requires a group entity type parameter, and only returns a group entity ID. Therefore, it cannot work when the group entity type is unknown.
The new function og_context_determine_context_info() returns an array of context data, containing both the group entity type and entity ID. This matches the return value from og_context().
Before:
// Get context from context handlers.
$gid = og_context_determine_context($group_type);
$context = array(
'group_type' => $group_type,
'gid' => $gid,
);
After:
// Get context from context handlers.
$context = og_context_determine_context_info($group_type);
Impacts:
Module developers