gitweb: Drop the href() params which keys are not in %mapping

If someone would enter parameter name incorrectly, and some key of
%params is not found in %mapping hash, the parameter is now
ignored. Change introduced by Martin Waitz in commit
  756d2f064b
tried to do that, but it left empty value and there was doubled ";;"
in returned string.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Jakub Narebski 2006-08-22 19:05:24 +02:00 коммит произвёл Junio C Hamano
Родитель 59b9f61a3f
Коммит 1149fecfc2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -285,7 +285,7 @@ sub href(%) {
my $href = "$my_uri?";
$href .= esc_param( join(";",
map {
"$mapping{$_}=$params{$_}" if defined $params{$_}
defined $params{$_} ? "$mapping{$_}=$params{$_}" : ()
} keys %params
) );