From e5bfbc53e668b219efca0fcf5682620f5d2261cc Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 30 Oct 2024 13:51:50 -0100 Subject: [PATCH] Update the way plugin class is instantiated (changes from 19605) --- .../Com/PTFSEurope/ReprintsDesk/Processor/CheckAvailability.pm | 2 +- .../Com/PTFSEurope/ReprintsDesk/Processor/EnqueueNotices.pm | 2 +- .../Com/PTFSEurope/ReprintsDesk/Processor/GetOrderHistory.pm | 2 +- .../Plugin/Com/PTFSEurope/ReprintsDesk/Processor/PlaceOrders.pm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/CheckAvailability.pm b/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/CheckAvailability.pm index f7f7297..fdb2e0d 100644 --- a/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/CheckAvailability.pm +++ b/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/CheckAvailability.pm @@ -21,7 +21,7 @@ sub run { $self->{dry_run} = $options->{dry_run}; $self->{env} = $options->{env}; - my $rd = Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new_backend( { logger => Koha::ILL::Request::Logger->new } ); + my $rd = Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new->new_ill_backend( { logger => Koha::ILL::Request::Logger->new } ); my $plugin = Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new(); my $config = decode_json( $plugin->retrieve_data("reprintsdesk_config") || {} ); diff --git a/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/EnqueueNotices.pm b/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/EnqueueNotices.pm index 816caad..23c74fa 100644 --- a/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/EnqueueNotices.pm +++ b/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/EnqueueNotices.pm @@ -35,7 +35,7 @@ sub run { $self->{dry_run} = $options->{dry_run}; $self->{env} = $options->{env}; $self->{rd} = - Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new_backend( { logger => Koha::ILL::Request::Logger->new } ); + Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new->new_ill_backend( { logger => Koha::ILL::Request::Logger->new } ); # Get branches that contain not 'COMP' requests # FIXME: There must be a prettier/better way of doing this diff --git a/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/GetOrderHistory.pm b/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/GetOrderHistory.pm index e4e8842..b122354 100644 --- a/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/GetOrderHistory.pm +++ b/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/GetOrderHistory.pm @@ -21,7 +21,7 @@ sub run { $self->{dry_run} = $options->{dry_run}; $self->{env} = $options->{env}; - my $rd = Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new_backend( { logger => Koha::ILL::Request::Logger->new } ); + my $rd = Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new->new_ill_backend( { logger => Koha::ILL::Request::Logger->new } ); my $response = $rd->{_api}->User_GetOrderHistory(2); my $body = from_json( $response->decoded_content ); diff --git a/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/PlaceOrders.pm b/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/PlaceOrders.pm index 8bc97a5..cec38b3 100644 --- a/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/PlaceOrders.pm +++ b/Koha/Plugin/Com/PTFSEurope/ReprintsDesk/Processor/PlaceOrders.pm @@ -19,7 +19,7 @@ sub run { $self->{dry_run} = $options->{dry_run}; $self->{env} = $options->{env}; - my $rd = Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new_backend( { logger => Koha::ILL::Request::Logger->new } ); + my $rd = Koha::Plugin::Com::PTFSEurope::ReprintsDesk->new->new_ill_backend( { logger => Koha::ILL::Request::Logger->new } ); # Prepare the query my $dbh = C4::Context->dbh;