]> Lady’s Gitweb - Gitweb/commit
gitweb: Fix "next" link on bottom of page
authorJakub Narebski <redacted>
Mon, 2 Jun 2008 09:54:41 +0000 (11:54 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:33 +0000 (00:07 -0400)
commitd802081da9fbd2c4a770512dd34d15294eccc5c56b61c76033acc6247802da97
treef0abcc5577e1b1e8ce9f3d3544e495a6c069202dbd4e2b059941ab0b53934ddd
parent33fbed3541fdd2b54b8009b4816ea619ce974a30d50c26b7eea79b78a4973a0a
gitweb: Fix "next" link on bottom of page

Fix search form generation to not modify $cgi->param(...)'s.

In git_header_html() we used to use $cgi->hidden(-name => "a") etc. to
generate hidden fields; unfortunately to use this form it is required
to modify $cgi->param("a") etc., which makes href(-replay,...) use
wrong replay values.  This for example made the "next" link on the
bottom of the page has a=search instead of a=$action, and thus fails to
get you to the next page.

Because in CGI the value of a hidden field is "sticky", there is no
way to modify it short of modifying $cgi->param(...).  Therefore it
got replaced by generating <input type="hidden" ...> element [semi]
directly.

Alternate solution would be for href(-replay,...) to use values saved
in global variables, such as $action etc., instead of (re)reading them
from $cgi->param($symbol).

The bad link was reported by Kai Blin through
  http://bugs.debian.org/481902

Reported-by: Kai Blin <redacted>
Signed-off-by: Jakub Narebski <redacted>
Tested-by: Gerrit Pape <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.215229 seconds and 4 git commands to generate.