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 756d2f064b2419fcdf9cd9c851f352e2a4f75103 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>
Jakub Narebski committed
Aug 22, 2006 at 19:05 UTC
1149fecfc270a2effc344897989f40afe449a72c
1 file changed
+1
-1
gitweb/gitweb.perl
+1
-1
@@ -285,7 +285,7 @@ sub href(%) {
285
my $href = "$my_uri?";
286
$href .= esc_param( join(";",
287
map {
288
- "$mapping{$_}=$params{$_}" if defined $params{$_}
288
+ defined $params{$_} ? "$mapping{$_}=$params{$_}" : ()
289
} keys %params
290
) );
291