diff options
| author | Jakub Narebski <jnareb@gmail.com> | 2006-08-22 19:05:24 +0200 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-08-22 16:12:26 -0700 |
| commit | 1149fecfc270a2effc344897989f40afe449a72c (patch) | |
| tree | 54f04463890dbaf3dbf776d0d3bde2353c74fa05 /gitweb/gitweb.perl | |
| parent | gitweb: Use here-doc (diff) | |
| download | git-1149fecfc270a2effc344897989f40afe449a72c.tar.gz git-1149fecfc270a2effc344897989f40afe449a72c.zip | |
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>
Diffstat (limited to 'gitweb/gitweb.perl')
| -rwxr-xr-x | gitweb/gitweb.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 1c8a2ebe15..43b1600486 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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 ) ); |
