From 08b8b7d630b1958e7b363c3794f8b67f667a9128 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Wed, 3 Nov 2010 01:05:34 +0000 Subject: Fixes #2606: Abstracted elgg_list_entities. Takes an optional second argument for the 'getter', defaulting to 'elgg_get_entities'. Converted current elgg_list_entities* functions to use it git-svn-id: http://code.elgg.org/elgg/trunk@7212 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/annotations.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'engine/lib/annotations.php') diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 48421b2d6..78ad7a1b1 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -561,20 +561,7 @@ $viewtypetoggle = false) { * @return str */ function elgg_list_entities_from_annotations($options = array()) { - $defaults = array( - 'offset' => (int) max(get_input('offset', 0), 0), - 'limit' => (int) max(get_input('limit', 10), 0), - 'full_view' => TRUE, - 'view_type_toggle' => FALSE, - 'pagination' => TRUE - ); - $options = array_merge($defaults, $options); - - $count = elgg_get_entities_from_annotations(array_merge(array('count' => TRUE), $options)); - $entities = elgg_get_entities_from_annotations($options); - - return elgg_view_entity_list($entities, $count, $options['offset'], - $options['limit'], $options['full_view'], $options['view_type_toggle'], $options['pagination']); + return elgg_list_entities($options, 'elgg_get_entities_from_annotations'); } /** -- cgit v1.2.3