]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: hack around CGI's list-context param() handling
[Gitweb] / gitweb.perl
index 2bb310bc0ea6a1bd3895091a43cc04e5ae3dfd8294af0bdbc4e5512fe983da16..9956e5991d009314fd0577b7f6ae10f3afc363a1c60de404b7b2d50bc28ca0d5 100755 (executable)
@@ -20,6 +20,10 @@ use File::Basename qw(basename);
 use Time::HiRes qw(gettimeofday tv_interval);
 binmode STDOUT, ':utf8';
 
+if (!defined($CGI::VERSION) || $CGI::VERSION < 4.08) {
+       eval 'sub CGI::multi_param { CGI::param(@_) }'
+}
+
 our $t0 = [ gettimeofday() ];
 our $number_of_git_cmds = 0;
 
@@ -872,7 +876,7 @@ sub evaluate_query_params {
 
        while (my ($name, $symbol) = each %cgi_param_mapping) {
                if ($symbol eq 'opt') {
-                       $input_params{$name} = [ map { decode_utf8($_) } $cgi->param($symbol) ];
+                       $input_params{$name} = [ map { decode_utf8($_) } $cgi->multi_param($symbol) ];
                } else {
                        $input_params{$name} = decode_utf8($cgi->param($symbol));
                }
This page took 0.218906 seconds and 4 git commands to generate.