@matheusbsbs / matheus-bagliano / commits / f04f27e8b2
Fork 0

gitweb: Sort the list of forks on the summary page by age

The list of forks on the summary page was unsorted, this just makes them sorted by age, which seems a fair way to decide which forks are shown before the list size cut-off (15) kicks in. s/noheader/no_header was just to make it obvious what the parameter affects, so all the code can be found with one grep. pb: As suggested by Mike, I have augmented this by an additional patch that refactors the sorting logic so that it is not tied to printing the headers. Signed-off-by: Mike Ralphson <mike@abacus.co.uk> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Mike Ralphson committed Sep 25, 2008 at 18:48 UTC f04f27e8b2a62f62d3ba168f1de4e45265830bff
1 file changed +2 -2
gitweb/gitweb.perl
+2 -2
@@ -4119,10 +4119,10 @@ sub git_summary {
4119
4120 if (@forklist) {
4121 git_print_header_div('forks');
4122 - git_project_list_body(\@forklist, undef, 0, 15,
4122 + git_project_list_body(\@forklist, 'age', 0, 15,
4123 $#forklist <= 15 ? undef :
4124 $cgi->a({-href => href(action=>"forks")}, "..."),
4125 - 'noheader');
4125 + 'no_header');
4126 }
4127
4128 git_footer_html();