diff options
author | Yorhel <git@yorhel.nl> | 2013-08-25 18:11:39 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2013-08-25 18:11:39 +0200 |
commit | 32287f77bb39b29226fed3704f5ea303cfc953be (patch) | |
tree | c58bb160a40416398ddbaa8c23f42611f41fdd5e /www | |
parent | 70fb2014b2bda04737f8e71c8146ef2e156c0414 (diff) |
www: Decrease importance of the section number in man page selection
The distro comparisons are more important, because otherwise some man
page lookups will result in receiving a very obscure man page from some
old version of FreeBSD or Gentoo, when you're more likely to look for
something modern.
Diffstat (limited to 'www')
-rwxr-xr-x | www/index.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/www/index.pl b/www/index.pl index 27d7415..2e9d0bf 100755 --- a/www/index.pl +++ b/www/index.pl @@ -469,15 +469,15 @@ sub getman { # Give lower priority to pages in a non-standard directory : !($a->{filename} =~ q{^/usr/share/man}) != !($b->{filename} =~ q{^/usr/share/man}) ? ($a->{filename} =~ q{^/usr/share/man} ? -1 : 1) - # Lower sections > higher sections (because 'man' does this as well) - : substr($a->{section},0,1) ne substr($b->{section},0,1) - ? $a->{section} cmp $b->{section} # Prefer Arch over other systems : ($a->{system} != 1 || $b->{system} != 1) && $self->{sysbyid}{$a->{system}}{name} ne $self->{sysbyid}{$b->{system}}{name} ? ($a->{system} == 1 ? -1 : 1) # Prefer a later system release over an older one : $a->{system} != $b->{system} && $self->{sysbyid}{$a->{system}}{name} eq $self->{sysbyid}{$b->{system}}{name} ? $self->{sysbyid}{$b->{system}}{relorder} <=> $self->{sysbyid}{$a->{system}}{relorder} + # Lower sections > higher sections (because 'man' does this as well) + : substr($a->{section},0,1) ne substr($b->{section},0,1) + ? $a->{section} cmp $b->{section} # Sections without appendix before sections with appendix : $a->{section} ne $b->{section} ? $a->{section} cmp $b->{section} |