]> Sergey Matveev's repositories - public-inbox.git/commitdiff
html/index: fix broken prev/next pagination on short histories
authorEric Wong <e@80x24.org>
Mon, 21 Apr 2014 10:10:14 +0000 (10:10 +0000)
committerEric Wong <e@80x24.org>
Mon, 21 Apr 2014 10:10:14 +0000 (10:10 +0000)
We do not have much history in public-inbox meta, so do
not mislead users with strange navigation elements which
lead nowhere.

lib/PublicInbox/Feed.pm

index 0f0528c91dbefea3b0d02d44cb9d3f666ec50f40..4671323cc1bd74b48a07c905b9065d889d28bcc9 100644 (file)
@@ -182,6 +182,10 @@ sub each_recent_blob {
                                last;
                        }
                }
+       } elsif ($reverse) {
+               unshift @commits, undef
+       } else {
+               push @commits, undef;
        }
 
        close $log; # we may EPIPE here