Bugzilla – Attachment 189491 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]
Bug 41237: Update fetch of patron's branchcode to search additional_contents by
Bug-41237-Update-fetch-of-patrons-branchcode-to-se.patch (text/plain), 1.98 KB, created by
Pedro Amorim
on 2025-11-11 15:27:52 UTC
(
hide
)
Description:
Bug 41237: Update fetch of patron's branchcode to search additional_contents by
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-11-11 15:27:52 UTC
Size:
1.98 KB
patch
obsolete
>From 0d70d1cf18fd6b18168fb3a4a5691edaf4979100 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] Bug 41237: Update fetch of patron's branchcode to search > additional_contents by > >--- > 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 5e76fc5889e..b71fc6db427 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -1080,12 +1080,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 17737e49001..13bece2c5a6 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -184,7 +184,6 @@ if ( $op eq 'list' ) { > } > > $params->{cardnumber} = $patron->cardnumber if $patron; >- $params->{branchcode} = $patron->branchcode if $patron; > $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