]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix pagination for galleries
authorEvan Prodromou <evan@prodromou.name>
Fri, 20 Jun 2008 19:56:27 +0000 (15:56 -0400)
committerEvan Prodromou <evan@prodromou.name>
Fri, 20 Jun 2008 19:56:27 +0000 (15:56 -0400)
darcs-hash:20080620195627-84dde-96d31837394eba6357e1134bc5a76b650dea42e6.gz

lib/gallery.php

index d0c55d634b0bc9d69f8f3f80c998c35363894b34..4bc7baf5d4b730935570f1498bd2fd8f70397b78 100644 (file)
@@ -19,8 +19,9 @@
 
 if (!defined('LACONICA')) { exit(1); }
 
-define('AVATARS_PER_ROW', 8);
-define('AVATARS_PER_PAGE', 80);
+# 9x9
+
+define('AVATARS_PER_PAGE', 81);
 
 class GalleryAction extends Action {
 
@@ -37,7 +38,10 @@ class GalleryAction extends Action {
                        $this->no_such_user();
                        return;
                }
-               $page = $this->arg('page') || 1;
+               $page = $this->arg('page');
+               if (!$page) {
+                       $page = 1;
+               }
                common_show_header($profile->nickname . ": " . $this->gallery_type(),
                                                   NULL, $profile,
                                                   array($this, 'show_top'));