aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/tidypics.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/tidypics.php b/lib/tidypics.php
index 38c6b31a8..1b230cbe2 100644
--- a/lib/tidypics.php
+++ b/lib/tidypics.php
@@ -167,7 +167,9 @@ function tidypics_list_photos(array $options = array()) {
$album = get_entity($options['container_guid']);
if ($album) {
$guids = $album->getImageList();
- $guids = array_slice($guids, $options['offset'], $options['limit']);
+ // need to pass all the guids and handle the limit / offset in sql
+ // to avoid problems with the navigation
+ //$guids = array_slice($guids, $options['offset'], $options['limit']);
$options['guids'] = $guids;
unset($options['container_guid']);
}
@@ -187,6 +189,10 @@ function tidypics_list_photos(array $options = array()) {
}
}
+ // for this function count means the total number of entities
+ // and is required for pagination
+ $options['count'] = $count;
+
return elgg_view_entity_list($sorted_entities, $options);
}