Bugzilla – Attachment 102292 Details for
Bug 23173
ILL should be able to search third party sources prior to request creation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23173: (follow-up) Small improvements in efficiency
Bug-23173-follow-up-Small-improvements-in-efficien.patch (text/plain), 3.45 KB, created by
Kyle M Hall (khall)
on 2020-04-02 11:59:16 UTC
(
hide
)
Description:
Bug 23173: (follow-up) Small improvements in efficiency
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-04-02 11:59:16 UTC
Size:
3.45 KB
patch
obsolete
>From d708501379f796ea1864b04ae1fa4d263f554e87 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 1 Apr 2020 15:09:48 -0400 >Subject: [PATCH] Bug 23173: (follow-up) Small improvements in efficiency > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > ill/ill-requests.pl | 44 ++++++++++++++++++++------------------------ > 1 file changed, 20 insertions(+), 24 deletions(-) > >diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl >index b1bc552139..df80dd5406 100755 >--- a/ill/ill-requests.pl >+++ b/ill/ill-requests.pl >@@ -86,14 +86,11 @@ if ( $backends_available ) { > # Does this backend enable us to insert an availability stage and should > # we? If not, proceed as normal. > if ( >- C4::Context->preference("ILLCheckAvailability") && >- $request->_backend_capability( >- 'should_display_availability', >- $params >- ) && > # If the user has elected to continue with the request despite > # having viewed availability info, this flag will be set >- !$params->{checked_availability} >+ C4::Context->preference("ILLCheckAvailability") >+ && !$params->{checked_availability} >+ && $request->_backend_capability( 'should_display_availability', $params ) > ) { > # Establish which of the installed availability providers > # can service our metadata >@@ -292,25 +289,24 @@ if ( $backends_available ) { > > # Prepare availability searching, if required > # Get the definition for the z39.50 plugin >- my $availability = Koha::Illrequest::Availability->new($request->metadata); >- my $services = $availability->get_services({ >- ui_context => 'partners', >- metadata => { >- name => 'ILL availability - z39.50' >+ if ( C4::Context->preference('ILLCheckAvailability') ) { >+ my $availability = Koha::Illrequest::Availability->new($request->metadata); >+ my $services = $availability->get_services({ >+ ui_context => 'partners', >+ metadata => { >+ name => 'ILL availability - z39.50' >+ } >+ }); >+ # Only pass availability searching stuff to the template if >+ # appropriate >+ if ( scalar @{$services} > 0 ) { >+ my $metadata = $availability->prep_metadata($request->metadata); >+ $template->param( metadata => $metadata ); >+ $template->param( >+ services_json => scalar encode_json($services) >+ ); >+ $template->param( services => $services ); > } >- }); >- # Only pass availability searching stuff to the template if >- # appropriate >- if ( >- C4::Context->preference('ILLCheckAvailability') && >- scalar @{$services} > 0 >- ) { >- my $metadata = $availability->prep_metadata($request->metadata); >- $template->param( metadata => $metadata ); >- $template->param( >- services_json => scalar encode_json($services) >- ); >- $template->param( services => $services ); > } > > $template->param( error => $params->{error} ) >-- >2.24.1 (Apple Git-126)
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 23173
:
91464
|
91465
|
92107
|
92108
|
92539
|
92540
|
92550
|
92551
|
92640
|
92641
|
92693
|
92694
|
92695
|
92715
|
92716
|
92717
|
93146
|
93147
|
93148
|
93909
|
93910
|
93911
|
95268
|
95269
|
95270
|
98521
|
99083
|
100724
|
100725
|
100740
|
102179
|
102180
|
102181
|
102182
|
102183
|
102184
|
102286
|
102287
|
102288
|
102289
|
102290
|
102291
| 102292 |
102293
|
102294