* unregister_elgg_event_handler() and unregister_plugin_hook() added. #1465
* clear_all_plugin_settings() added.
* get_entity_relationships() supports inverse relationships. #1472.
+ * can_write_to_container() can be overridden with the container_permissions_check hook. #1164 (part 2).
Services API:
* Separated user and api authenticate processing
$container_guid = page_owner();
}
if (!$container_guid) {
- return true;
+ $return = TRUE;
}
$container = get_entity($container_guid);
if ($container) {
// If the user can edit the container, they can also write to it
if ($container->canEdit($user_guid)) {
- return true;
+ $return = TRUE;
}
// Basics, see if the user is a member of the group.
if ($user && $container instanceof ElggGroup) {
if (!$container->isMember($user)) {
- return false;
+ $return = FALSE;
} else {
- return true;
+ $return = TRUE;
}
}
// See if anyone else has anything to say
return trigger_plugin_hook('container_permissions_check', $entity_type,
- array('container' => $container, 'user' => $user), false);
+ array('container' => $container, 'user' => $user), $return);
}
return false;