]> git.deb.at Git - deb/packages.git/commitdiff
Fix handling of parameters when more than one replace pattern has
authorFrank Lichtenheld <frank@lichtenheld.de>
Mon, 20 Feb 2006 15:05:34 +0000 (15:05 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Mon, 20 Feb 2006 15:05:34 +0000 (15:05 +0000)
been given

lib/Packages/Search.pm

index c0555e2bb302b0dfdd241e742c9370ccae205cb4..1851c837845c465582edfc43723e039b733a21f5 100644 (file)
@@ -134,9 +134,10 @@ sub parse_params {
        my @p_value_no_replace = @p_value;
 
        if ($params{$param}{replace} && @p_value) {
-           @p_value = ();
            foreach my $pattern (keys %{$params{$param}{replace}}) {
-               foreach (@p_value_no_replace) {
+               my @p_value_tmp = @p_value;
+               @p_value = ();
+               foreach (@p_value_tmp) {
                    if ($_ eq $pattern) {
                        my $replacement = $params{$param}{replace}{$_};
                        if (ref $replacement) {