aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/annotations.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-03 01:05:34 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-03 01:05:34 +0000
commit08b8b7d630b1958e7b363c3794f8b67f667a9128 (patch)
tree81b7e3b1d5f931dae7d517500c2762ccdcc4b736 /engine/lib/annotations.php
parentb8688c6c4f82c5eb3ec3f9744a0ba2e348cb45ba (diff)
downloadelgg-08b8b7d630b1958e7b363c3794f8b67f667a9128.tar.gz
elgg-08b8b7d630b1958e7b363c3794f8b67f667a9128.tar.bz2
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
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r--engine/lib/annotations.php15
1 files changed, 1 insertions, 14 deletions
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');
}
/**