git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Update gitweb.perl to current CGI.pm API

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2014, 20:18 UTC
Message-ID
<xmqq1tq7u5sq.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CANQwDwdm6aMVC7U+nbbtS=J8M2fYOk_MECt_1=NX=pXdt06YjQ@mail.gmail.com>
Jakub Narębski <jnareb@gmail.com> writes:
Show 9 quoted lines
> On Thu, Oct 16, 2014 at 9:36 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
>> Looks sensible to me; Jakub, ack?
>>
>
> Ack.
>
> Nb. this code follows back to original gitweb.cgi by Kay Sievers, very
> early in the development (2005)

Thanks. I realize that Ack sounds as if "Yeah, I acknowledge and admit I was in the wrong earlier", but I didn't mean "I think this is your bug---do you think it is a good fix?" I just meant the latter half of that sentence.

Here is what I'll queue (note: I've retitled so that an entry in "git shortlog" would mean something).

Thanks, both.
-- >8 --
From: Roland Mas <lolando@debian.org>
Subject: [PATCH] gitweb: use start_form, not startform that was removed in CGI.pm 4.04

CGI.pm 4.04 removed the startform method, which had previously been deprecated in favour of start_form. Changes file for CGI.pm says:

    4.04 2014-09-04
     [ REMOVED / DEPRECATIONS ]
	- startform and endform methods removed (previously deprecated,
	  you should be using the start_form and end_form methods)
Signed-off-by: Roland Mas <lolando@debian.org>
Reviewed-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 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.2-561-gc401a55
Previous: Junio C Hamano
Message 3 of 3 in “Update gitweb.perl to current CGI.pm API”
  1. Update gitweb.perl to current CGI.pm APIRoland Mas, Oct 16, 2014
  2. Junio C HamanoOct 16, 2014
  3. Junio C HamanoOct 16, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.