]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4243. Added docs for metadata_calculation option to elgg_get_metadata().
authorBrett Profitt <brett.profitt@gmail.com>
Tue, 10 Jan 2012 01:29:04 +0000 (17:29 -0800)
committerBrett Profitt <brett.profitt@gmail.com>
Tue, 10 Jan 2012 01:29:04 +0000 (17:29 -0800)
engine/lib/annotations.php
engine/lib/metadata.php
engine/lib/metastrings.php

index 30ef7f17b97a56aa483ca0aa183c6bc1c6fc1446..7eb72612ffcbaa4e6307be90b73b96c10d46a83f 100644 (file)
@@ -179,14 +179,14 @@ function update_annotation($annotation_id, $name, $value, $value_type, $owner_gu
  *
  * @param array $options Array in format:
  *
- *     annotation_names              => NULL|ARR Annotation names
- *     annotation_values             => NULL|ARR Annotation values
- *     annotation_ids                => NULL|ARR annotation ids
- *     annotation_case_sensitive     => BOOL Overall Case sensitive
- *  annotation_owner_guids        => NULL|ARR guids for annotation owners
- *  annotation_created_time_lower => INT Lower limit for created time.
- *  annotation_created_time_upper => INT Upper limit for created time.
- *  annotation_calculation        => STR Perform the MySQL function on the annotation values returned.
+ * annotation_names              => NULL|ARR Annotation names
+ * annotation_values             => NULL|ARR Annotation values
+ * annotation_ids                => NULL|ARR annotation ids
+ * annotation_case_sensitive     => BOOL Overall Case sensitive
+ * annotation_owner_guids        => NULL|ARR guids for annotation owners
+ * annotation_created_time_lower => INT Lower limit for created time.
+ * annotation_created_time_upper => INT Upper limit for created time.
+ * annotation_calculation        => STR Perform the MySQL function on the annotation values returned.
  *                                   Do not confuse this "annotation_calculation" option with the
  *                                   "calculation" option to elgg_get_entities_from_annotation_calculation().
  *                                   The "annotation_calculation" option causes this function to
index 6e1b8b39cfbe0f19b0745c0a10ff500c9222b87b..a097cd3ef2c523e6b9d6b2a07e8a7cb9329d2573 100644 (file)
@@ -269,21 +269,18 @@ $access_id = ACCESS_PRIVATE, $allow_multiple = false) {
  *
  * @param array $options Array in format:
  *
- *     metadata_names => NULL|ARR metadata names
- *
- *     metadata_values => NULL|ARR metadata values
- *
-*      metadata_ids => NULL|ARR metadata ids
- *
- *     metadata_case_sensitive => BOOL Overall Case sensitive
- *
- *  metadata_owner_guids => NULL|ARR guids for metadata owners
- *
- *  metadata_created_time_lower => INT Lower limit for created time.
- *
- *  metadata_created_time_upper => INT Upper limit for created time.
- *
- *  metadata_calculation => STR Perform the MySQL function on the metadata values returned.
+ * metadata_names               => NULL|ARR metadata names
+ * metadata_values              => NULL|ARR metadata values
+ * metadata_ids                 => NULL|ARR metadata ids
+ * metadata_case_sensitive      => BOOL Overall Case sensitive
+ * metadata_owner_guids         => NULL|ARR guids for metadata owners
+ * metadata_created_time_lower  => INT Lower limit for created time.
+ * metadata_created_time_upper  => INT Upper limit for created time.
+ * metadata_calculation         => STR Perform the MySQL function on the metadata values returned.
+ *                                   The "metadata_calculation" option causes this function to
+ *                                   return the result of performing a mathematical calculation on
+ *                                   all metadata that match the query instead of returning
+ *                                   ElggMetadata objects.
  *
  * @return mixed
  * @since 1.8.0
index 9fe9b4bff507c716e6c41578a16d5c80e4be9df3..d8fef6f1cff54cc63080b9f40e620ad37c0d63ef 100644 (file)
@@ -609,8 +609,7 @@ function elgg_get_metastring_sql($table, $names = null, $values = null,
 }
 
 /**
- * Normalizes metadata / annotation option names to their
- * corresponding metastrings name.
+ * Normalizes metadata / annotation option names to their corresponding metastrings name.
  *
  * @param array $options An options array
  * @since 1.8.0
@@ -631,10 +630,10 @@ function elgg_normalize_metastrings_options(array $options = array()) {
 
        // map the metadata_* options to metastring_* options
        $map = array(
-               'names'                                 =>      'metastring_names',
-               'values'                                =>      'metastring_values',
-               'case_sensitive'                =>      'metastring_case_sensitive',
-               'owner_guids'                   =>      'metastring_owner_guids',
+               'names'                                 =>      'metastring_names',
+               'values'                                =>      'metastring_values',
+               'case_sensitive'                =>      'metastring_case_sensitive',
+               'owner_guids'                   =>      'metastring_owner_guids',
                'created_time_lower'    =>      'metastring_created_time_lower',
                'created_time_upper'    =>      'metastring_created_time_upper',
                'calculation'                   =>      'metastring_calculation',