]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Allow for multivalued parameters passed to href subroutine
[Gitweb] / gitweb.perl
index 4a8d5e66c9da09efc342d18a20b8fdadd907ce61b45fdb243def0ff15ec5f3b5..972339da499be91b809b8aa037fc4c7d6a7a5b07b528c0dccd57f058688cf3f8 100755 (executable)
@@ -630,7 +630,13 @@ sub href(%) {
        for (my $i = 0; $i < @mapping; $i += 2) {
                my ($name, $symbol) = ($mapping[$i], $mapping[$i+1]);
                if (defined $params{$name}) {
-                       push @result, $symbol . "=" . esc_param($params{$name});
+                       if (ref($params{$name}) eq "ARRAY") {
+                               foreach my $par (@{$params{$name}}) {
+                                       push @result, $symbol . "=" . esc_param($par);
+                               }
+                       } else {
+                               push @result, $symbol . "=" . esc_param($params{$name});
+                       }
                }
        }
        $href .= "?" . join(';', @result) if scalar @result;
This page took 0.237552 seconds and 4 git commands to generate.