Bugzilla – Attachment 189514 Details for
Bug 41237
OPAC created requests ignore library selection, always default to patron's library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[24.11.x] Bug 41237: Update fetch of patron's branchcode to search additional_contents by
2411x-Bug-41237-Update-fetch-of-patrons-branchcode.patch (text/plain), 2.09 KB, created by
Pedro Amorim
on 2025-11-12 14:15:05 UTC
(
hide
)
Description:
[24.11.x] Bug 41237: Update fetch of patron's branchcode to search additional_contents by
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-11-12 14:15:05 UTC
Size:
2.09 KB
patch
obsolete
>From 9fe47fa540c44f93a0c949bb6b0d3767ac6a4f57 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Tue, 11 Nov 2025 15:11:34 +0000 >Subject: [PATCH] [24.11.x] Bug 41237: Update fetch of patron's branchcode to > search additional_contents by > >Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> >--- > Koha/ILL/Request.pm | 10 ++++++---- > opac/opac-illrequests.pl | 1 - > 2 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm >index 62aeb52208d..923aba860bf 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -1018,12 +1018,14 @@ sub backend_create { > # Establish whether we need to do a generic copyright clearance. > if ( $params->{opac} ) { > >+ my $patron = $params->{cardnumber} ? Koha::Patrons->find( { cardnumber => $params->{cardnumber} } ) : undef; >+ my $patron_branchcode = $patron ? $patron->branchcode : undef; > my $copyright_content = Koha::AdditionalContents->search_for_display( > { >- category => 'html_customizations', >- location => ['ILLModuleCopyrightClearance'], >- lang => $params->{lang}, >- library_id => $params->{branchcode}, >+ category => 'html_customizations', >+ location => ['ILLModuleCopyrightClearance'], >+ lang => $params->{lang}, >+ $patron_branchcode ? ( library_id => $patron_branchcode ) : (), > } > ); > >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index a9968a357ee..e94ac1cc3a1 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -157,7 +157,6 @@ if ( $op eq 'list' ) { > my $patron = Koha::Patrons->find( { borrowernumber => $loggedinuser } ); > > $params->{cardnumber} = $patron->cardnumber; >- $params->{branchcode} = $patron->branchcode; > $params->{opac} = 1; > $params->{lang} = C4::Languages::getlanguage($query); > my $backend_result = $request->backend_create($params); >-- >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 41237
:
189491
|
189492
|
189493
|
189494
| 189514