]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
more pagination math
authorEvan Prodromou <evan@prodromou.name>
Thu, 20 Nov 2008 14:38:40 +0000 (09:38 -0500)
committerEvan Prodromou <evan@prodromou.name>
Thu, 20 Nov 2008 14:38:40 +0000 (09:38 -0500)
darcs-hash:20081120143840-84dde-af7dd6ad2dd3b6d8181d9554b1866cabdfcb7285.gz

lib/gallery.php

index fa79be8e38940692017e49802886bc7e81be43d3..683898d5db20f7c0a3f6c0e7817e6ae53293cadf 100644 (file)
@@ -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'));