aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metadata.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-17 23:14:33 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-17 23:14:33 +0000
commitba94a48ff66a001dd20c5ac2da34681880583945 (patch)
tree29b0ebfcd19ba03c69cd8ad7e4171c0002b3d207 /engine/lib/metadata.php
parentb3012350e2d8dafaf696e2c472f8cf0ae5e1674b (diff)
downloadelgg-ba94a48ff66a001dd20c5ac2da34681880583945.tar.gz
elgg-ba94a48ff66a001dd20c5ac2da34681880583945.tar.bz2
Fixes #1488: Removed use of deprecated functions in core.
git-svn-id: http://code.elgg.org/elgg/trunk@3947 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r--engine/lib/metadata.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 159e9187a..71b6c2634 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -850,11 +850,24 @@ $count = FALSE, $case_sensitive = TRUE) {
*
* @return string A list of entities suitable for display
*/
-function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true, $case_sensitive = true ) {
+function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type = ELGG_ENTITIES_ANY_VALUE, $entity_subtype = ELGG_ENTITIES_ANY_VALUE, $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true, $case_sensitive = true ) {
$offset = (int) get_input('offset');
$limit = (int) $limit;
- $count = get_entities_from_metadata($meta_name, $meta_value, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", 0, true, $case_sensitive );
- $entities = get_entities_from_metadata($meta_name, $meta_value, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", 0, false, $case_sensitive );
+ $options = array(
+ 'metadata_name' => $meta_name,
+ 'metadata_value' => $meta_value,
+ 'types' => $entity_type,
+ 'subtypes' => $entity_subtype,
+ 'owner_guid' => $owner_guid,
+ 'limit' => $limit,
+ 'offset' => $offset,
+ 'count' => TRUE,
+ 'case_sensitive' => $case_sensitive
+ );
+ $count = elgg_get_entities_from_metadata($options);
+
+ $options['count'] = FALSE;
+ $entities = elgg_get_entities_from_metadata($options);
return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, $pagination);
}