diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-30 16:05:26 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-30 16:05:26 +0000 |
commit | 0b86e98313e6c046abbcd70a4c43fa9ecb68a64a (patch) | |
tree | f6fef62822e19a7f187e93c1f0f83b1ae7c17943 /engine/lib | |
parent | 263dab14a2164967ce5759e749ed53afe7737617 (diff) | |
download | elgg-0b86e98313e6c046abbcd70a4c43fa9ecb68a64a.tar.gz elgg-0b86e98313e6c046abbcd70a4c43fa9ecb68a64a.tar.bz2 |
Namespaced metadata keys for elgg_get_entities_from_metadata() so no clashes will happen with annotations.
git-svn-id: http://code.elgg.org/elgg/trunk@3607 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/metadata.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index ea1ce412d..342910d47 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -553,23 +553,23 @@ function find_metadata($meta_name = "", $meta_value = "", $entity_type = "", $en */ function elgg_get_entities_from_metadata(array $options = array()) { $defaults = array( - 'names' => NULL, - 'name' => NULL, - 'values' => NULL, - 'value' => NULL, - 'name_value_pair' => NULL, - 'name_value_pairs' => NULL, - 'name_value_pairs_operator' => 'AND', - 'case_sensitive' => TRUE + 'metadata_names' => NULL, + 'metadata_name' => NULL, + 'metadata_values' => NULL, + 'metadata_value' => NULL, + 'metadata_name_value_pair' => NULL, + 'metadata_name_value_pairs' => NULL, + 'metadata_name_value_pairs_operator' => 'AND', + 'metadata_case_sensitive' => TRUE ); $options = array_merge($defaults, $options); - $singulars = array('name', 'value', 'name_value_pair'); + $singulars = array('metadata_name', 'metadata_value', 'metadata_name_value_pair'); $options = elgg_normalise_plural_options_array($options, $singulars); - $clauses = elgg_get_entity_metadata_where_sql('e', $options['names'], $options['values'], - $options['name_value_pairs'], $options['name_value_pairs_operator'], $options['case_sensitive']); + $clauses = elgg_get_entity_metadata_where_sql('e', $options['metadata_names'], $options['metadata_values'], + $options['metadata_name_value_pairs'], $options['metadata_name_value_pairs_operator'], $options['metadata_case_sensitive']); if ($clauses) { // merge wheres to pass to get_entities() @@ -794,10 +794,10 @@ $count = FALSE, $case_sensitive = TRUE) { $options = array(); - $options['names'] = $meta_name; + $options['metadata_names'] = $meta_name; if ($meta_value) { - $options['values'] = $meta_value; + $options['metadata_values'] = $meta_value; } if ($entity_type) { @@ -833,7 +833,7 @@ $count = FALSE, $case_sensitive = TRUE) { } // need to be able to pass false - $options['case_sensitive'] = $case_sensitive; + $options['metadata_case_sensitive'] = $case_sensitive; return elgg_get_entities_from_metadata($options); } |