* [PATCH] Update gitweb.perl to current CGI.pm API
@ 2014-10-16 6:54 Roland Mas
2014-10-16 19:36 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Roland Mas @ 2014-10-16 6:54 UTC (permalink / raw)
To: git; +Cc: Jonathan Nieder, 765525
Hi all,
This simple two-line patch fixes a bug that makes gitweb unusable on
systems where the installed CGI.pm is version 4.04 or later (such as on
Debian unstable). That version removed the startform method, which had
previously been deprecated in favour of start_form since 2009.
I don't have any specific tests for that change, but it does help
fixing the testsuite of FusionForge (which includes a test of its Git
plugin, involving gitweb).
For reference, this is Debian bug #765525 (http://bugs.debian.org/765525).
(I'm not subscribed to the git@vger mailing-list; please Cc me on
replies.)
Thanks,
Roland.
>From 1b74cfb8568927a307f165e428455789398f6d61 Mon Sep 17 00:00:00 2001
From: Roland Mas <lolando@debian.org>
Date: Thu, 16 Oct 2014 00:05:25 +0200
Subject: [PATCH] Update gitweb.perl to current CGI.pm API
CGI.pm 4.04 removed the startform method, which had previously been
deprecated in favour of start_form. Updated gitweb.perl accordingly.
Signed-off-by: Roland Mas <lolando@debian.org>
---
gitweb/gitweb.perl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a9f57d6..ccf7516 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4100,7 +4100,7 @@ sub print_search_form {
if ($use_pathinfo) {
$action .= "/".esc_url($project);
}
- print $cgi->startform(-method => "get", -action => $action) .
+ print $cgi->start_form(-method => "get", -action => $action) .
"<div class=\"search\">\n" .
(!$use_pathinfo &&
$cgi->input({-name=>"p", -value=>$project, -type=>"hidden"}) . "\n") .
@@ -5510,7 +5510,7 @@ sub git_project_search_form {
}
print "<div class=\"projsearch\">\n";
- print $cgi->startform(-method => 'get', -action => $my_uri) .
+ print $cgi->start_form(-method => 'get', -action => $my_uri) .
$cgi->hidden(-name => 'a', -value => 'project_list') . "\n";
print $cgi->hidden(-name => 'pf', -value => $project_filter). "\n"
if (defined $project_filter);
--
2.1.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Update gitweb.perl to current CGI.pm API
2014-10-16 6:54 [PATCH] Update gitweb.perl to current CGI.pm API Roland Mas
@ 2014-10-16 19:36 ` Junio C Hamano
[not found] ` <CANQwDwdm6aMVC7U+nbbtS=J8M2fYOk_MECt_1=NX=pXdt06YjQ@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2014-10-16 19:36 UTC (permalink / raw)
To: Jakub Narębski; +Cc: Jonathan Nieder, git, Roland Mas
Looks sensible to me; Jakub, ack?
Roland Mas <lolando@debian.org> writes:
> Hi all,
>
> This simple two-line patch fixes a bug that makes gitweb unusable on
> systems where the installed CGI.pm is version 4.04 or later (such as on
> Debian unstable). That version removed the startform method, which had
> previously been deprecated in favour of start_form since 2009.
>
> I don't have any specific tests for that change, but it does help
> fixing the testsuite of FusionForge (which includes a test of its Git
> plugin, involving gitweb).
>
> For reference, this is Debian bug #765525 (http://bugs.debian.org/765525).
>
> (I'm not subscribed to the git@vger mailing-list; please Cc me on
> replies.)
>
> Thanks,
>
> Roland.
>
> From 1b74cfb8568927a307f165e428455789398f6d61 Mon Sep 17 00:00:00 2001
> From: Roland Mas <lolando@debian.org>
> Date: Thu, 16 Oct 2014 00:05:25 +0200
> Subject: [PATCH] Update gitweb.perl to current CGI.pm API
>
> CGI.pm 4.04 removed the startform method, which had previously been
> deprecated in favour of start_form. Updated gitweb.perl accordingly.
>
> Signed-off-by: Roland Mas <lolando@debian.org>
> ---
> gitweb/gitweb.perl | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index a9f57d6..ccf7516 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -4100,7 +4100,7 @@ sub print_search_form {
> if ($use_pathinfo) {
> $action .= "/".esc_url($project);
> }
> - print $cgi->startform(-method => "get", -action => $action) .
> + print $cgi->start_form(-method => "get", -action => $action) .
> "<div class=\"search\">\n" .
> (!$use_pathinfo &&
> $cgi->input({-name=>"p", -value=>$project, -type=>"hidden"}) . "\n") .
> @@ -5510,7 +5510,7 @@ sub git_project_search_form {
> }
>
> print "<div class=\"projsearch\">\n";
> - print $cgi->startform(-method => 'get', -action => $my_uri) .
> + print $cgi->start_form(-method => 'get', -action => $my_uri) .
> $cgi->hidden(-name => 'a', -value => 'project_list') . "\n";
> print $cgi->hidden(-name => 'pf', -value => $project_filter). "\n"
> if (defined $project_filter);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-16 20:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-16 6:54 [PATCH] Update gitweb.perl to current CGI.pm API Roland Mas
2014-10-16 19:36 ` Junio C Hamano
[not found] ` <CANQwDwdm6aMVC7U+nbbtS=J8M2fYOk_MECt_1=NX=pXdt06YjQ@mail.gmail.com>
2014-10-16 20:18 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.