Make pagestats output more deterministic.
Sort in lexical order the pages that have the same number of hits.master
parent
592c13cc61
commit
c1890c116d
|
@ -86,7 +86,7 @@ sub preprocess (@) {
|
||||||
if (exists $params{limit}) {
|
if (exists $params{limit}) {
|
||||||
my $i=0;
|
my $i=0;
|
||||||
my %show;
|
my %show;
|
||||||
foreach my $key (sort { $counts{$b} <=> $counts{$a} } keys %counts) {
|
foreach my $key (sort { $counts{$b} <=> $counts{$a} || $a cmp $b } keys %counts) {
|
||||||
last if ++$i > $params{limit};
|
last if ++$i > $params{limit};
|
||||||
$show{$key}=$counts{$key};
|
$show{$key}=$counts{$key};
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ sub preprocess (@) {
|
||||||
htmllink($params{page}, $params{destpage}, $_, noimageinline => 1, linktext => linktext($_, %params)).
|
htmllink($params{page}, $params{destpage}, $_, noimageinline => 1, linktext => linktext($_, %params)).
|
||||||
"</td><td>".$counts{$_}."</td></tr>"
|
"</td><td>".$counts{$_}."</td></tr>"
|
||||||
}
|
}
|
||||||
sort { $counts{$b} <=> $counts{$a} } keys %counts).
|
sort { $counts{$b} <=> $counts{$a} || $a cmp $b } keys %counts).
|
||||||
"\n</table>\n" ;
|
"\n</table>\n" ;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue