diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:17:34 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:17:34 -0800 |
commit | 0b5c641490b11d887ec147b7acbe6f147bce6905 (patch) | |
tree | dbe89aa7ee5c9554dc1e84362faf9956eebc09d6 | |
parent | 8d5134399c8f87d57b7199b8886f7aa8169e3df5 (diff) | |
parent | 13dbf46a397260675a16b506314b0b2ed9713bbb (diff) | |
download | git-0b5c641490b11d887ec147b7acbe6f147bce6905.tar.gz git-0b5c641490b11d887ec147b7acbe6f147bce6905.tar.xz |
Merge branch 'jk/gitweb-with-newer-cgi-multi-param' into maint
"gitweb" used to depend on a behaviour that was deprecated by recent
CGI.pm.
* jk/gitweb-with-newer-cgi-multi-param:
gitweb: hack around CGI's list-context param() handling
-rwxr-xr-x | gitweb/gitweb.perl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index ccf75169d..7a5b23acf 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)); } |