diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-26 16:45:32 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-26 16:45:32 +0000 |
commit | 1d32fd2b562ba61f4a5a6b253812d0489513b9d5 (patch) | |
tree | d7013ac57258c72fa67a4af2103a792bc60fd4d3 /engine/lib | |
parent | d2889b825d4e53619808d49f9ed3b55dca549b9b (diff) | |
download | elgg-1d32fd2b562ba61f4a5a6b253812d0489513b9d5.tar.gz elgg-1d32fd2b562ba61f4a5a6b253812d0489513b9d5.tar.bz2 |
Fix problem rewriting type_subtype_pair -> type_subtype_pairs in elgg_get_entities().
git-svn-id: http://code.elgg.org/elgg/trunk@6238 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/entities.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index a18e1c612..3b3830948 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1808,10 +1808,18 @@ function elgg_get_entities(array $options = array()) { 'joins' => array() ); - $options = array_merge($defaults, $options); - $singulars = array('type', 'subtype', 'owner_guid', 'container_guid', 'site_guid', 'type_subtype_pair'); + // can't use helper function with type_subtype_pair because it's already an array...just need to merge it + if (isset($options['type_subtype_pair'])) { + if (isset($options['type_subtype_pairs'])) { + $options['type_subtype_pairs'] = array_merge($options['type_subtype_pairs'], $options['type_subtype_pair']); + } else { + $options['type_subtype_pairs'] = $options['type_subtype_pair']; + } + } + + $singulars = array('type', 'subtype', 'owner_guid', 'container_guid', 'site_guid'); $options = elgg_normalise_plural_options_array($options, $singulars); // evaluate where clauses |