summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a17171b)
raw | patch | inline | side by side (parent: a17171b)
author | Lea Wiemann <lewiemann@gmail.com> | |
Tue, 27 May 2008 23:25:42 +0000 (01:25 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 28 May 2008 05:27:30 +0000 (22:27 -0700) |
There was a bug in the implementation of the "next" links in
format_paging_nav (for log and shortlog), which caused the next links
to always be displayed, even if there is no next page. This fixes it.
Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
format_paging_nav (for log and shortlog), which caused the next links
to always be displayed, even if there is no next page. This fixes it.
Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 12843a4846563842aef8f0311096794ad70011c3..345acf4520c286ff17a09625ef18c0c0e23621c4 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
}
sub format_paging_nav {
- my ($action, $hash, $head, $page, $nrevs) = @_;
+ my ($action, $hash, $head, $page, $has_next_link) = @_;
my $paging_nav;
$paging_nav .= " ⋅ prev";
}
- if ($nrevs >= (100 * ($page+1)-1)) {
+ if ($has_next_link) {
$paging_nav .= " ⋅ " .
$cgi->a({-href => href(-replay=>1, page=>$page+1),
-accesskey => "n", -title => "Alt-n"}, "next");
my @commitlist = parse_commits($hash, 101, (100 * $page));
- my $paging_nav = format_paging_nav('log', $hash, $head, $page, (100 * ($page+1)));
+ my $paging_nav = format_paging_nav('log', $hash, $head, $page, $#commitlist >= 100);
git_header_html();
git_print_page_nav('log','', $hash,undef,undef, $paging_nav);
my @commitlist = parse_commits($hash, 101, (100 * $page));
- my $paging_nav = format_paging_nav('shortlog', $hash, $head, $page, (100 * ($page+1)));
+ my $paging_nav = format_paging_nav('shortlog', $hash, $head, $page, $#commitlist >= 100);
my $next_link = '';
if ($#commitlist >= 100) {
$next_link =