diff options
-rw-r--r-- | cgi/index.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cgi/index.pl b/cgi/index.pl index 1e33e48..10f6880 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -54,6 +54,20 @@ sub handle_request { return; } + if ($template eq 'single') { + if (not @platforms) { + for my $result (@results) { + if (not ($result->platform ~~ \@platforms)) { + push(@platforms, $result->platform); + } + } + @platforms = sort { $a <=> $b } @platforms; + } + my %pcnt; + @results = grep { $pcnt{$_->platform}++ < 1 } @results; + @results = sort { $a->platform <=> $b->platform } @results; + } + for my $result (@results) { my $platform = ( split( / /, $result->platform ) )[0]; if ($via) { |