Bug 10519: (followup) Fix context for evalyating $borrowernumber
authorJacek Ablewicz <abl@biblos.pk.edu.pl>
Fri, 13 Jun 2014 19:27:38 +0000 (21:27 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 14 Jul 2014 19:02:36 +0000 (16:02 -0300)
Follow-up to fix additional suggestion statuses, which are not working
properly due to

   416:  borrowernumber           => $input->param('borrowernumber'),

being evaluated in list context inside $template->param() call arguments.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

suggestion/suggestion.pl

index 2af64ab..fa5fe3f 100755 (executable)
@@ -413,7 +413,7 @@ foreach my $field ( qw(managedby acceptedby suggestedby budgetid) ) {
 
 $template->param(
     %hashlists,
-    borrowernumber           => $input->param('borrowernumber'),
+    borrowernumber           => ($input->param('borrowernumber') // undef),
     SuggestionStatuses       => GetAuthorisedValues('SUGGEST_STATUS'),
 );
 output_html_with_http_headers $input, $cookie, $template->output;