aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/deprecated-1.8.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php
index 27a973601..bb52881cd 100644
--- a/engine/lib/deprecated-1.8.php
+++ b/engine/lib/deprecated-1.8.php
@@ -1152,10 +1152,22 @@ function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type
$offset = (int)get_input('offset');
$limit = (int)$limit;
- $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,
- 'metadata_case_sensitive' => $case_sensitive);
+ $options = array(
+ 'metadata_name' => $meta_name,
+ 'metadata_value' => $meta_value,
+ 'types' => $entity_type,
+ 'subtypes' => $entity_subtype,
+ 'limit' => $limit,
+ 'offset' => $offset,
+ 'count' => TRUE,
+ 'metadata_case_sensitive' => $case_sensitive
+ );
+
+ // previous function allowed falsy $owner_guid for anything
+ if ($owner_guid) {
+ $options['owner_guid'] = $owner_guid;
+ }
+
$count = elgg_get_entities_from_metadata($options);
$options['count'] = FALSE;