summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-20 15:56:27 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-20 15:56:27 -0400
commit4b2883832ef9bae8307c598adaa8f3a91d683c58 (patch)
tree1a872c70a0f22382db1590b74cdf3659e27bed1a /lib
parent22423f4210f1e83c38aff9e68733c387352422c9 (diff)
fix pagination for galleries
darcs-hash:20080620195627-84dde-96d31837394eba6357e1134bc5a76b650dea42e6.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/gallery.php b/lib/gallery.php
index d0c55d634..4bc7baf5d 100644
--- a/lib/gallery.php
+++ b/lib/gallery.php
@@ -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'));