From: Chris Sharp Date: Mon, 29 Aug 2022 16:45:16 +0000 (-0400) Subject: declare the variable once, then update the values X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3d4921435806156f9c887fbc91b3aa73630951e9;p=working%2FEvergreen.git declare the variable once, then update the values Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm index ef80e31317..0477da203a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm @@ -20,14 +20,15 @@ my $U = 'OpenILS::Application::AppUtils'; my $self = shift; my $path = $self->apache->path_info; my $update_type = 'register'; +my @api_fields; if ($path =~ m|opac/erenew/submit|) { - my $update_type = 'renew'; + $update_type = 'renew'; } # Create different api_fields array if registration or renewal if ($update_type == 'renew') { - my @api_fields = ( + @api_fields = ( {name => 'vendor_username', required => 1}, {name => 'vendor_password', required => 1}, {name => 'patron_id', required => 1}, #needed for matching @@ -57,7 +58,7 @@ if ($update_type == 'renew') { {name => 'temp_renewal'} #new boolean value ); } else { - my @api_fields = ( + @api_fields = ( {name => 'vendor_username', required => 1}, {name => 'vendor_password', required => 1}, {name => 'first_given_name', class => 'au', required => 1},