]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #4176 added elgg_list_registered_entities() fix to 1.8 branch
authorcash <cash.costello@gmail.com>
Sun, 4 Dec 2011 01:04:01 +0000 (20:04 -0500)
committercash <cash.costello@gmail.com>
Sun, 4 Dec 2011 01:08:51 +0000 (20:08 -0500)
engine/lib/entities.php

index f7ae108ed54ac47b60504caa47fb725210c96f59..dbb5ee69557b6a1323d64edd33d5074b0a95cf60 100644 (file)
@@ -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']);