From 1b52d536e998f8faab65f422f6a5f1f309d0e204 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 14 Aug 2024 14:41:35 +0000 Subject: [PATCH] Bug 37308: (QA follow-up) Tidy code Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer (cherry picked from commit 5a06bd0d73d51bbc87a7e4ff210434b8782b90ec) Signed-off-by: Lucas Gass (cherry picked from commit 955f724b1d645d77fcca65c07c844ddd39811789) Signed-off-by: Fridolin Somers --- Koha/ERM/EUsage/UsageDataProvider.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Koha/ERM/EUsage/UsageDataProvider.pm b/Koha/ERM/EUsage/UsageDataProvider.pm index 1f2f7de9a3..e85ee58ce8 100644 --- a/Koha/ERM/EUsage/UsageDataProvider.pm +++ b/Koha/ERM/EUsage/UsageDataProvider.pm @@ -174,9 +174,9 @@ sub harvest_sushi { $self->{report_type} = $args->{report_type}; $self->{begin_date} = $args->{begin_date}; $self->{end_date} = $args->{end_date}; - my $url = $self->_build_url_query; - my $request = HTTP::Request->new( 'GET' => $url ); - my $ua = LWP::UserAgent->new; + my $url = $self->_build_url_query; + my $request = HTTP::Request->new( 'GET' => $url ); + my $ua = LWP::UserAgent->new; $ua->agent( 'Koha/' . Koha::version() ); my $response = $ua->simple_request($request); @@ -277,10 +277,10 @@ sub test_connection { $url .= 'status'; $url .= '?customer_id=' . $self->customer_id; $url .= '&requestor_id=' . $self->requestor_id if $self->requestor_id; - $url .= '&api_key=' . $self->api_key if $self->api_key; + $url .= '&api_key=' . $self->api_key if $self->api_key; - my $request = HTTP::Request->new( 'GET' => $url ); - my $ua = LWP::UserAgent->new; + my $request = HTTP::Request->new( 'GET' => $url ); + my $ua = LWP::UserAgent->new; $ua->agent( 'Koha/' . Koha::version() ); my $response = $ua->simple_request($request); @@ -396,9 +396,9 @@ sub _build_url_query { $url .= lc $self->{report_type}; $url .= '?customer_id=' . $self->customer_id; $url .= '&requestor_id=' . $self->requestor_id if $self->requestor_id; - $url .= '&api_key=' . $self->api_key if $self->api_key; + $url .= '&api_key=' . $self->api_key if $self->api_key; $url .= '&begin_date=' . substr $self->{begin_date}, 0, 7 if $self->{begin_date}; - $url .= '&end_date=' . substr $self->{end_date}, 0, 7 if $self->{end_date}; + $url .= '&end_date=' . substr $self->{end_date}, 0, 7 if $self->{end_date}; return $url; } -- 2.39.5