Bugzilla – Attachment 176680 Details for
Bug 36197
Allow unauthenticated ILL requests in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36197: (QA follow-up): Make ConfirmAuto::get_priority_backends respect opac_available_backends if OPAC
Bug-36197-QA-follow-up-Make-ConfirmAutogetpriority.patch (text/plain), 2.07 KB, created by
Pedro Amorim
on 2025-01-16 15:52:11 UTC
(
hide
)
Description:
Bug 36197: (QA follow-up): Make ConfirmAuto::get_priority_backends respect opac_available_backends if OPAC
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-01-16 15:52:11 UTC
Size:
2.07 KB
patch
obsolete
>From 60777a28254702b18fa129065cb6515cce468f4a Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 16 Jan 2025 15:49:20 +0000 >Subject: [PATCH] Bug 36197: (QA follow-up): Make > ConfirmAuto::get_priority_backends respect opac_available_backends if OPAC > >This makes it so that the Auto ILL stage on OPAC only queries opac_available_backends. >Fix is submitted here and not in bug 35604 because it's here that opac_available_backends is implemented. >--- > Koha/ILL/Request/Workflow/ConfirmAuto.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/Koha/ILL/Request/Workflow/ConfirmAuto.pm b/Koha/ILL/Request/Workflow/ConfirmAuto.pm >index fe257020114..45adbe02577 100644 >--- a/Koha/ILL/Request/Workflow/ConfirmAuto.pm >+++ b/Koha/ILL/Request/Workflow/ConfirmAuto.pm >@@ -78,7 +78,7 @@ sub confirm_auto_template_params { > $params->{method} = 'confirmautoill' if $self->{ui_context} eq 'staff'; > delete $params->{stage} if $self->{ui_context} eq 'staff'; > >- my @backends = $self->get_priority_backends(); >+ my @backends = $self->get_priority_backends( $self->{ui_context} ); > return ( > whole => $params, > metadata => $self->prep_metadata($params), >@@ -101,11 +101,15 @@ Returns backends ordered by AutoILLBackendPriority > =cut > > sub get_priority_backends { >- my ( $self, $params ) = @_; >+ my ( $self, $ui_context ) = @_; >+ >+ my $opac_backends; >+ $opac_backends = Koha::ILL::Backends->opac_available_backends() if $ui_context eq 'opac'; > > my @backends; > my @priority_enabled_backends = split ",", C4::Context->preference('AutoILLBackendPriority'); > foreach my $backend (@priority_enabled_backends) { >+ next if $ui_context eq 'opac' && !grep { $_ eq $backend } @$opac_backends; > my $loaded_backend = Koha::ILL::Request->new->load_backend($backend); > my $availability_check_info = $loaded_backend->_backend->availability_check_info( $self->{metadata} ); > push @backends, $availability_check_info if $availability_check_info; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36197
:
171358
|
171359
|
171360
|
171361
|
171362
|
171363
|
171364
|
171365
|
171366
|
171367
|
171368
|
171369
|
171370
|
171371
|
174495
|
174496
|
174497
|
174498
|
174499
|
174500
|
174501
|
174502
|
174503
|
174504
|
174505
|
174506
|
174507
|
174508
|
176564
|
176565
|
176680
|
176723
|
176724
|
176726
|
176727
|
179764
|
179765
|
179766
|
179767
|
179769
|
179770
|
179771
|
179772
|
179773
|
179774
|
179775
|
179776
|
179777
|
179778
|
179779
|
179780
|
179781
|
179782
|
179783
|
179784
|
179785
|
180850
|
180851
|
180852
|
180853
|
180854
|
180855
|
180856
|
180857
|
180858
|
180859
|
180860
|
180861
|
180862
|
180863
|
180864
|
180865
|
180866
|
180867
|
180868
|
180869
|
180870
|
180871
|
180872
|
180873
|
181073
|
181074
|
181075
|
181076
|
181077
|
181078
|
181079
|
181080
|
181081
|
181082
|
181083
|
181084
|
181085
|
181086
|
181087
|
181088
|
181089
|
181090
|
181091
|
181092
|
181093
|
181094
|
181095
|
181096
|
181097
|
181098
|
181592