From: cash Date: Sat, 6 Jul 2013 02:31:56 +0000 (-0400) Subject: Fixes #4293 don't require both offset key and offset for listing stuff X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=0dfe018f16e93aff5f046c08994a102e3f5d35e6;p=lorea%2Felgg.git Fixes #4293 don't require both offset key and offset for listing stuff --- diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 226cf5c6c..997db79d2 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1473,8 +1473,10 @@ function elgg_list_entities(array $options = array(), $getter = 'elgg_get_entiti global $autofeed; $autofeed = true; + $offset_key = isset($options['offset_key']) ? $options['offset_key'] : 'offset'; + $defaults = array( - 'offset' => (int) max(get_input('offset', 0), 0), + 'offset' => (int) max(get_input($offset_key, 0), 0), 'limit' => (int) max(get_input('limit', 10), 0), 'full_view' => TRUE, 'list_type_toggle' => FALSE,