diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-22 17:56:16 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-22 17:56:16 +0000 |
commit | f7b20eb31aeab71ab42e1f4e66d5b12506e9d526 (patch) | |
tree | ba070a7f5f23fff7fabeea8013d25f779a09a985 /mod/groups/views/default/sharing | |
parent | fbf1ce69b529129c1d92772c2805f99480bd4650 (diff) | |
download | elgg-f7b20eb31aeab71ab42e1f4e66d5b12506e9d526.tar.gz elgg-f7b20eb31aeab71ab42e1f4e66d5b12506e9d526.tar.bz2 |
Updated groups to 1.7 api.
git-svn-id: http://code.elgg.org/elgg/trunk@5851 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/sharing')
-rw-r--r-- | mod/groups/views/default/sharing/invite.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mod/groups/views/default/sharing/invite.php b/mod/groups/views/default/sharing/invite.php index 5c3d6b316..bd8e7c821 100644 --- a/mod/groups/views/default/sharing/invite.php +++ b/mod/groups/views/default/sharing/invite.php @@ -1,7 +1,7 @@ <?php /** * Elgg groups plugin - * + * * @package ElggGroups * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd @@ -11,26 +11,27 @@ $owner = $vars['owner']; $group = $vars['group']; - - if ($friends = get_entities_from_relationship('friend',$owner->getGUID(),false,'user','')) { - + + $options = array('relationship' => 'friend', 'relationship_guid' => $owner->getGUID(), 'type' => 'user'); + if ($friends = elgg_get_entities_from_relationship($options)) { + foreach($friends as $friend) { - + if (!$group->isMember($friend)) { $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny')); - $label .= "{$friend->name}"; + $label .= "{$friend->name}"; $options[$label] = $friend->getGUID(); } } - + if ($options) { echo elgg_view('input/checkboxes',array( - + 'internalname' => 'user_guid', 'options' => $options, - + )); } else |