Bug 9432: Plack changes for acqui/addorderiso2409.pl
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 19 Jan 2013 00:48:20 +0000 (19:48 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 6 Feb 2013 17:31:20 +0000 (12:31 -0500)
Without this patch, after selecting the file I want to add acquisitions
from, Plack explodes. With this patch, it works.

To test without Plack:
1) Apply patch.
2) Try adding an order item from a staged file.
3) If it works, there are no regressions from the patch.

To test with Plack:
1) Try adding an order item from a staged file. It will fail.
2) Apply patch.
3) Try adding an order item from a staged file.
3) If it works, the patch is successful.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Fixes Plack, does not break Apache. Works as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
acqui/addorderiso2709.pl

index 0e0670f..abfb870 100755 (executable)
@@ -425,11 +425,11 @@ sub batch_info {
                                               'current_matcher_description' => $matcher->description());
         }
     }
-    add_matcher_list($batch->{'matcher_id'});
+    add_matcher_list($batch->{'matcher_id'}, $template);
 }
 
 sub add_matcher_list {
-    my $current_matcher_id = shift;
+    my ($current_matcher_id, $template) = @_;
     my @matchers = C4::Matcher::GetMatcherList();
     if (defined $current_matcher_id) {
         for (my $i = 0; $i <= $#matchers; $i++) {