From bec736b56df76b8211a02ac058a80ebbc1642aec Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Fri, 2 Sep 2022 17:35:15 -0400 Subject: [PATCH] Online Renewal - Get URL path in a different way Signed-off-by: Terran McCanna --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 00637e2471..72f41be775 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm @@ -16,17 +16,20 @@ $Data::Dumper::Indent = 0; my $U = 'OpenILS::Application::AppUtils'; # Check URL to see if this is a new registration or a renewal -my $self = shift; -my $path = $self->apache->path_info; +my $refpath = ''; +if ($ENV{'HTTP_REFERER'}) { + $refpath = $ENV{'HTTP_REFERER'} +}; + my $update_type = 'register'; my @api_fields; -if ($path =~ m|opac/erenew/submit|) { +if ($refpath =~ m|opac/erenew/submit|) { $update_type = 'renew'; } # Create different api_fields array if registration or renewal -if ($update_type == 'renew') { +if ($update_type eq 'renew') { @api_fields = ( {name => 'vendor_username', required => 1}, {name => 'vendor_password', required => 1}, -- 2.11.0