From 2dbb9772881131f5739bae2d1ce5955587e9ab78 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 6 Mar 2013 16:51:20 -0500 Subject: Fixes #4393 working around the overloaded 'count' parameter --- engine/lib/metadata.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engine/lib/metadata.php') diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 35b7b4dfb..96d446060 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -281,6 +281,14 @@ $access_id = ACCESS_PRIVATE, $allow_multiple = false) { * @since 1.8.0 */ function elgg_get_metadata(array $options = array()) { + + // @todo remove support for count shortcut - see #4393 + // support shortcut of 'count' => true for 'metadata_calculation' => 'count' + if (isset($options['count']) && $options['count']) { + $options['metadata_calculation'] = 'count'; + unset($options['count']); + } + $options['metastring_type'] = 'metadata'; return elgg_get_metastring_based_objects($options); } -- cgit v1.2.3