summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-11-18 12:44:16 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-11-18 12:44:16 -0800
commit372f589f66436c5b5bb8ed8a98532842c1e01a71 (patch)
treed5180b31a916edbc744289b8f194d28e40b98d3a /modules/gallery/libraries
parent4d4e81ca267cf6dd4fd48c2185d6e24949e0568f (diff)
parent350f6b58764beced6cd32497ad11e530b091fd5c (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r--modules/gallery/libraries/Theme_View.php2
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;