aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-21 13:00:08 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-21 13:00:08 +0000
commit75187715f6d7a04bbda4858d6a17138001da4807 (patch)
tree9a87d9b742c6f82bd6a9ac3a9c51c972ec6cb670 /engine
parentc100c017b6c9aeb6faf5b901fe0e128035e9b1e0 (diff)
downloadelgg-75187715f6d7a04bbda4858d6a17138001da4807.tar.gz
elgg-75187715f6d7a04bbda4858d6a17138001da4807.tar.bz2
deprecated two site functions and removed a use of previously deprecated function in the wire plugin
git-svn-id: http://code.elgg.org/elgg/trunk@7396 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/classes/ElggSite.php9
-rw-r--r--engine/lib/sites.php10
-rw-r--r--engine/lib/views.php10
3 files changed, 21 insertions, 8 deletions
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index 6c70d176b..93d442e0a 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -204,7 +204,14 @@ class ElggSite extends ElggEntity {
* @return array of ElggUsers
*/
public function getMembers($limit = 10, $offset = 0) {
- get_site_members($this->getGUID(), $limit, $offset);
+ return elgg_get_entities_from_relationship(array(
+ 'relationship' => 'member_of_site',
+ 'relationship_guid' => $this->getGUID(),
+ 'inverse_relationship' => TRUE,
+ 'types' => 'user',
+ 'limit' => $limit,
+ 'offset' => $offset
+ ));
}
/**
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 79b71d901..cf838e720 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -139,8 +139,12 @@ function remove_site_user($site_guid, $user_guid) {
* @param int $offset Offset
*
* @return mixed
+ * @deprecated 1.8 Use ElggSite::getMembers()
*/
function get_site_members($site_guid, $limit = 10, $offset = 0) {
+ elgg_deprecated_notice("get_site_members() deprecated.
+ Use ElggSite::getMembers()", 1.8);
+
$site_guid = (int)$site_guid;
$limit = (int)$limit;
$offset = (int)$offset;
@@ -162,8 +166,13 @@ function get_site_members($site_guid, $limit = 10, $offset = 0) {
* @param bool $fullview Whether or not to display the full view (default: true)
*
* @return string A displayable list of members
+ * @deprecated 1.8 Use elgg_list_entities_from_relationships() with relationship
+ * 'member_of_site'
*/
function list_site_members($site_guid, $limit = 10, $fullview = true) {
+ elgg_deprecated_notice("list_site_members() deprecated.
+ Use elgg_list_entities_from_relationships()", 1.8);
+
$offset = (int) get_input('offset');
$limit = (int) $limit;
$options = array(
@@ -179,7 +188,6 @@ function list_site_members($site_guid, $limit = 10, $fullview = true) {
$entities = get_site_members($site_guid, $limit, $offset);
return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview);
-
}
/**
diff --git a/engine/lib/views.php b/engine/lib/views.php
index f20eabfbf..0c9e83bab 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -786,13 +786,11 @@ function elgg_view_annotation(ElggAnnotation $annotation, $bypass = true, $debug
* Returns a rendered list of entities with pagination. This function should be
* called by wrapper functions.
*
- * @see list_entities()
- * @see list_user_objects()
+ * @see elgg_list_entities()
* @see list_user_friends_objects()
- * @see list_entities_from_metadata()
- * @see list_entities_from_metadata_multi()
- * @see list_entities_from_relationships()
- * @see list_site_members()
+ * @see elgg_list_entities_from_metadata()
+ * @see elgg_list_entities_from_relationships()
+ * @see elgg_list_entities_from_annotations()
*
* @param array $entities List of entities
* @param int $count The total number of entities across all pages