diff options
Diffstat (limited to 'modules/gallery/libraries/Theme_View.php')
-rw-r--r-- | modules/gallery/libraries/Theme_View.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 07ba3bbf..b1167d0e 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -171,7 +171,7 @@ class Theme_View_Core extends Gallery_View { } $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; - $v->last_visible_position = $this->page * $this->page_size; + $v->last_visible_position = min($this->page * $this->page_size, $v->total); } else { $v->position = $this->position; $v->total = $this->sibling_count; |