From f9ee6f1429f800c3eed3c0ef59d98219be32fba8 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 22 Aug 2010 19:04:55 +0000 Subject: Merged r6614:6617 from 1.7 branch into trunk git-svn-id: http://code.elgg.org/elgg/trunk@6845 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/forms/groups/invite.php | 14 +++----- mod/groups/views/default/groups/groupprofile.php | 11 +------ mod/groups/views/default/sharing/invite.php | 42 ------------------------ 3 files changed, 5 insertions(+), 62 deletions(-) delete mode 100644 mod/groups/views/default/sharing/invite.php (limited to 'mod/groups/views/default') diff --git a/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php index 11c7fcbdf..6fd418cb9 100644 --- a/mod/groups/views/default/forms/groups/invite.php +++ b/mod/groups/views/default/forms/groups/invite.php @@ -12,23 +12,17 @@ $group = $vars['entity']; $owner = get_entity($vars['entity']->owner_guid); $forward_url = $group->getURL(); - $options = array( - 'relationship' => 'friend', - 'relationship_guid' => get_loggedin_user()->guid, - 'type' => 'user', - 'limit' => 9999 - ); - $friends = elgg_get_entities_from_relationship($options); + $friends = get_loggedin_user()->getFriends('', 0); + if ($friends) { ?>
- $friends, 'internalname' => 'user_guid', 'highlight' => 'all')); - - ?> +?> diff --git a/mod/groups/views/default/groups/groupprofile.php b/mod/groups/views/default/groups/groupprofile.php index 13b244f88..7ba24a4c7 100644 --- a/mod/groups/views/default/groups/groupprofile.php +++ b/mod/groups/views/default/groups/groupprofile.php @@ -91,16 +91,7 @@ __HTML; echo "

" . elgg_echo("groups:owner") . ": owner_guid)->getURL() . "\">" . get_user($vars['entity']->owner_guid)->name . "

"; ?>

'member', - 'relationship_guid' => $vars['entity']->guid, - 'inverse_relationship' => TRUE, - 'limit' => 0, - 'count' => TRUE - ); - - $count = elgg_get_entities_from_relationship($options); - + $count = $vars['entity']->getMembers(0, 0, TRUE); echo elgg_echo('groups:members') . ": " . $count; ?>

diff --git a/mod/groups/views/default/sharing/invite.php b/mod/groups/views/default/sharing/invite.php deleted file mode 100644 index bd8e7c821..000000000 --- a/mod/groups/views/default/sharing/invite.php +++ /dev/null @@ -1,42 +0,0 @@ - '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}"; - $options[$label] = $friend->getGUID(); - } - } - - if ($options) - { - echo elgg_view('input/checkboxes',array( - - 'internalname' => 'user_guid', - 'options' => $options, - - )); - } - else - { - echo elgg_echo('groups:nofriends'); - } - } -?> \ No newline at end of file -- cgit v1.2.3