From: nickw Date: Mon, 5 Apr 2010 20:13:36 +0000 (+0000) Subject: Refs #1947: Do not require views to explicitly pass in the offset. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=8c3f28568fb67c22554461da9d4f9ddec0427446;p=lorea%2Felgg.git Refs #1947: Do not require views to explicitly pass in the offset. git-svn-id: http://code.elgg.org/elgg/trunk@5624 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 9587bf1e4..8f383904d 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -743,8 +743,12 @@ function elgg_view_annotation(ElggAnnotation $annotation, $bypass = true, $debug */ function elgg_view_entity_list($entities, $count, $offset, $limit, $fullview = true, $viewtypetoggle = true, $pagination = true) { $count = (int) $count; - $offset = (int) $offset; $limit = (int) $limit; + + // do not require views to explicitly pass in the offset + if (!$offset = (int) $offset) { + $offset = get_input('offset', 0); + } $context = get_context();