aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/file/start.php5
-rw-r--r--mod/groups/views/default/forms/groups/invite.php14
-rw-r--r--mod/groups/views/default/groups/groupprofile.php11
-rw-r--r--mod/groups/views/default/sharing/invite.php42
4 files changed, 9 insertions, 63 deletions
diff --git a/mod/file/start.php b/mod/file/start.php
index 06f64fddf..e8e70e6cd 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -214,8 +214,11 @@
} else {
$friendofguid = false;
}
- return elgg_view('file/typecloud',array('owner_guid' => $owner_guid, 'friend_guid' => $friendofguid, 'types' => get_tags(0,10,'simpletype','object','file',$owner_guid)));
+ elgg_register_tag_metadata_name('simpletype');
+ $types = get_tags(0,10,'simpletype','object','file',$owner_guid);
+
+ return elgg_view('file/typecloud',array('owner_guid' => $owner_guid, 'friend_guid' => $friendofguid, 'types' => $types));
}
/**
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) {
?>
<form action="<?php echo $vars['url']; ?>action/groups/invite" method="post" id="invite_to_group" class="margin_top">
- <?php
+<?php
echo elgg_view('input/securitytoken');
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'); ?>" />
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 "<p><b>" . elgg_echo("groups:owner") . ": </b><a href=\"" . get_user($vars['entity']->owner_guid)->getURL() . "\">" . get_user($vars['entity']->owner_guid)->name . "</a></p>";
?>
<p><?php
- $options = array(
- 'relationship' => '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;
?></p>
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 @@
-<?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
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
-
- $owner = $vars['owner'];
- $group = $vars['group'];
-
- $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}";
- $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