aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/forms
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-22 17:56:16 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-22 17:56:16 +0000
commitf7b20eb31aeab71ab42e1f4e66d5b12506e9d526 (patch)
treeba070a7f5f23fff7fabeea8013d25f779a09a985 /mod/groups/views/default/forms
parentfbf1ce69b529129c1d92772c2805f99480bd4650 (diff)
downloadelgg-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/forms')
-rw-r--r--mod/groups/views/default/forms/groups/invite.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php
index e5042aa4e..07fe7ad97 100644
--- a/mod/groups/views/default/forms/groups/invite.php
+++ b/mod/groups/views/default/forms/groups/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
@@ -12,21 +12,29 @@
$group = $vars['entity'];
$owner = get_entity($vars['entity']->owner_guid);
$forward_url = $group->getURL();
-
-
+
+ $friends = elgg_get_entities_from_relationship($options);
+ $options = array(
+ 'relationship' => 'friend',
+ 'relationship_guid' => get_loggedin_user()->guid,
+ 'type' => 'user',
+ 'limit' => 9999
+ );
+if ($friends) {
?>
<form action="<?php echo $vars['url']; ?>action/groups/invite" method="post" class="margin_top">
<?php
echo elgg_view('input/securitytoken');
- if ($friends = get_entities_from_relationship('friend',$_SESSION['guid'],false,'user','',0,'',9999)) {
- echo elgg_view('friends/picker',array('entities' => $friends, 'internalname' => 'user_guid', 'highlight' => 'all'));
- }
- // echo elgg_view('sharing/invite',array('shares' => $shares, 'owner' => $owner, 'group' => $group));
-
+ echo elgg_view('friends/picker',array('entities' => $friends, 'internalname' => 'user_guid', 'highlight' => 'all'));
+
?>
<input type="hidden" name="forward_url" value="<?php echo $forward_url; ?>" />
<input type="hidden" name="group_guid" value="<?php echo $group->guid; ?>" />
<input type="submit" value="<?php echo elgg_echo('invite'); ?>" />
</form>
+<?php
+} else {
+ echo elgg_echo('groups:nofriendsatall');
+} \ No newline at end of file