diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-14 23:49:43 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-14 23:49:43 +0000 |
commit | 2b2afd98c05139c1a5c25f1752e2bb412e26e335 (patch) | |
tree | 813350181be64e239287c0bb587a3a49320a49b7 /engine/lib | |
parent | e60d45a1e8025a10220a42285d3ff17335af5214 (diff) | |
download | elgg-2b2afd98c05139c1a5c25f1752e2bb412e26e335.tar.gz elgg-2b2afd98c05139c1a5c25f1752e2bb412e26e335.tar.bz2 |
Fixed problem with list_entities_from_metadata() wrapper.
git-svn-id: http://code.elgg.org/elgg/trunk@9001 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/deprecated-1.8.php | 20 |
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; |