Bugzilla – Attachment 79033 Details for
Bug 20639
Allow setting a default/single backend for OPAC driven requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20639: (follow-up) Fix variable not passed
Bug-20639-follow-up-Fix-variable-not-passed.patch (text/plain), 2.49 KB, created by
Andrew Isherwood
on 2018-09-17 14:11:55 UTC
(
hide
)
Description:
Bug 20639: (follow-up) Fix variable not passed
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2018-09-17 14:11:55 UTC
Size:
2.49 KB
patch
obsolete
>From 616c55dc8534b3e31c86459f86c362e27431a9f6 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 17 Sep 2018 15:04:56 +0100 >Subject: [PATCH] Bug 20639: (follow-up) Fix variable not passed > >available_backends expects a variable declaring the contents >of the ILLopacbackends syspref. This wasn't being passed in all calls to >it, so I've removed the requirement for it being passed, we now check >the contents of the syspref in available_backends itselfBug >--- > Koha/Illrequest/Config.pm | 5 +++-- > opac/opac-illrequests.pl | 7 +++---- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/Koha/Illrequest/Config.pm b/Koha/Illrequest/Config.pm >index 6c0b9dc2b5..91a4356d1c 100644 >--- a/Koha/Illrequest/Config.pm >+++ b/Koha/Illrequest/Config.pm >@@ -113,12 +113,13 @@ will filter those backends down to only those present in the list. > =cut > > sub available_backends { >- my ( $self, $reduce ) = @_; >+ my ( $self ) = @_; >+ my $reduced = C4::Context->preference('ILLOpacbackends'); > my $backend_dir = $self->backend_dir; > my @backends = (); > @backends = glob "$backend_dir/*" if ( $backend_dir ); > @backends = map { basename($_) } @backends; >- @backends = grep { $_ =~ /$reduce/ } @backends if $reduce; >+ @backends = grep { $_ =~ /$reduced/ } @backends if $reduced; > return \@backends; > } > >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index 329dc24792..e5df0300e6 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -50,8 +50,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ > }); > > # Are we able to actually work? >-my $reduced = C4::Context->preference('ILLOpacbackends'); >-my $backends = Koha::Illrequest::Config->new->available_backends($reduced); >+my $backends = Koha::Illrequest::Config->new->available_backends; > my $backends_available = ( scalar @{$backends} > 0 ); > $template->param( backends_available => $backends_available ); > >@@ -65,7 +64,7 @@ if ( $op eq 'list' ) { > my $req = Koha::Illrequest->new; > $template->param( > requests => $requests, >- backends => $req->available_backends >+ backends => $backends > ); > > } elsif ( $op eq 'view') { >@@ -105,7 +104,7 @@ if ( $op eq 'list' ) { > if (!$params->{backend}) { > my $req = Koha::Illrequest->new; > $template->param( >- backends => $req->available_backends >+ backends => $backends > ); > } else { > my $request = Koha::Illrequest->new >-- >2.11.0
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 20639
:
74806
|
74811
|
75165
|
78119
|
79033
|
79474
|
79477
|
79478
|
84932
|
84933
|
84934