summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-11-20 09:38:40 -0500
committerEvan Prodromou <evan@prodromou.name>2008-11-20 09:38:40 -0500
commit9da1bce9403efd24b40db882e211df595681a9e3 (patch)
tree38579975af0a4b7c302f2c6aeb3e5e76d7332a14 /lib
parent2412fde116adcc091bc55b50cd2a46aba0514e7a (diff)
more pagination math
darcs-hash:20081120143840-84dde-af7dd6ad2dd3b6d8181d9554b1866cabdfcb7285.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gallery.php b/lib/gallery.php
index fa79be8e3..683898d5d 100644
--- a/lib/gallery.php
+++ b/lib/gallery.php
@@ -201,13 +201,13 @@ class GalleryAction extends Action {
common_element('a', array('href' => common_local_url($this->trimmed('action'),
array('display' => 'icons',
'nickname' => $profile->nickname,
- 'page' => floor(($page * AVATARS_PER_PAGE) / PROFILES_PER_PAGE)))),
+ 'page' => 1 + floor((($page - 1) * AVATARS_PER_PAGE) / PROFILES_PER_PAGE)))),
_('Icons'));
break;
default:
common_element('a', array('href' => common_local_url($this->trimmed('action'),
array('nickname' => $profile->nickname,
- 'page' => floor(($page * PROFILES_PER_PAGE) / AVATARS_PER_PAGE)))),
+ 'page' => 1 + floor((($page - 1) * PROFILES_PER_PAGE) / AVATARS_PER_PAGE)))),
_('List'));
common_text(' | ');
common_element('span', NULL, _('Icons'));