diff options
author | cash <cash.costello@gmail.com> | 2011-12-03 20:04:01 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-12-03 20:08:51 -0500 |
commit | 998b5cdc825de34d02d3204adf3bf6eccea74b66 (patch) | |
tree | 56b9f92907f246e897176b0cec4daecd123e9879 | |
parent | a11763fa453c1771fd76091ce01fee8cd34773ca (diff) | |
download | elgg-998b5cdc825de34d02d3204adf3bf6eccea74b66.tar.gz elgg-998b5cdc825de34d02d3204adf3bf6eccea74b66.tar.bz2 |
Refs #4176 added elgg_list_registered_entities() fix to 1.8 branch
-rw-r--r-- | engine/lib/entities.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index f7ae108ed..dbb5ee695 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -2147,8 +2147,13 @@ function elgg_list_registered_entities(array $options = array()) { } } - $count = elgg_get_entities(array_merge(array('count' => TRUE), $options)); - $entities = elgg_get_entities($options); + if (!empty($options['type_subtype_pairs'])) { + $count = elgg_get_entities(array_merge(array('count' => TRUE), $options)); + $entities = elgg_get_entities($options); + } else { + $count = 0; + $entities = array(); + } return elgg_view_entity_list($entities, $count, $options['offset'], $options['limit'], $options['full_view'], $options['list_type_toggle'], $options['pagination']); |