summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-05 11:42:55 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-05 11:42:56 -0800
commit0b0cd3792049ffad85a626b0f82d78c4cf4e59a2 (patch)
tree7640992e29ec958fb3d18685902869b4bc0e47e0
parent0e0252b75573a98640eb8754467d00697f1ee117 (diff)
parent13dbf46a397260675a16b506314b0b2ed9713bbb (diff)
downloadgit-0b0cd3792049ffad85a626b0f82d78c4cf4e59a2.tar.gz
Merge branch 'jk/gitweb-with-newer-cgi-multi-param'
* jk/gitweb-with-newer-cgi-multi-param: gitweb: hack around CGI's list-context param() handling
-rwxr-xr-xgitweb/gitweb.perl6
1 files changed, 5 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ccf75169dd..7a5b23acf2 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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;
@@ -871,7 +875,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));
}