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:04:01 -0500 |
commit | 8e7dfcc5146f1cb22e684a9cdb635bbac184d6a1 (patch) | |
tree | f493587624a572b34b03a7d510c06aed5211ba86 | |
parent | 9a63bf008a0b6d7770c1fb3c8687129291bd7265 (diff) | |
download | elgg-8e7dfcc5146f1cb22e684a9cdb635bbac184d6a1.tar.gz elgg-8e7dfcc5146f1cb22e684a9cdb635bbac184d6a1.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']); |