Bugzilla – Attachment 122207 Details for
Bug 28600
Variable "$patron" is not available
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28600: Resolve variable scope issue
Bug-28600-Resolve-variable-scope-issue.patch (text/plain), 2.48 KB, created by
Jonathan Druart
on 2021-06-21 07:59:02 UTC
(
hide
)
Description:
Bug 28600: Resolve variable scope issue
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-06-21 07:59:02 UTC
Size:
2.48 KB
patch
obsolete
>From 677f9664bf4645a64a9d9befde0b3016c530d168 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 18 Jun 2021 15:20:30 -0300 >Subject: [PATCH] Bug 28600: Resolve variable scope issue > >This patch fixes a scope issue. Originally, a variable declared as > >our $borcat > >was replaced by > >my $patron > >This patch makes the method not rely on global variables, but have a >parameter for the patron, and thus things are clearer. > >To test: >1. Open the OPAC detail page for a record >=> FAIL: The logs show some errors about the $patron variable not >available in the scope >2. Apply this patch >3. Repeat 1 >=> SUCCESS: No errors >4. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > opac/opac-detail.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 6173b728622..51491846ad8 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -260,7 +260,7 @@ if ($session->param('busc')) { > # Search given the current values from the busc param > sub searchAgain > { >- my ($arrParamsBusc, $offset, $results_per_page) = @_; >+ my ($arrParamsBusc, $offset, $results_per_page, $patron) = @_; > > my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } }; > my @servers; >@@ -341,7 +341,7 @@ if ($session->param('busc')) { > } > $arrParamsBusc{'count'} = $count; > $results_per_page = $count; >- my $newresultsRef = searchAgain(\%arrParamsBusc, $offset, $results_per_page); >+ my $newresultsRef = searchAgain(\%arrParamsBusc, $offset, $results_per_page, $patron); > $arrParamsBusc{'listBiblios'} = buildListBiblios($newresultsRef, $results_per_page); > delete $arrParamsBusc{'previous'} if (exists($arrParamsBusc{'previous'})); > delete $arrParamsBusc{'next'} if (exists($arrParamsBusc{'next'})); >@@ -452,7 +452,7 @@ if ($session->param('busc')) { > $offsetSearch = 0 if (defined($offsetSearch) && $offsetSearch < 0); > } > if ($searchAgain) { >- my $newresultsRef = searchAgain(\%arrParamsBusc, $offsetSearch, $results_per_page); >+ my $newresultsRef = searchAgain(\%arrParamsBusc, $offsetSearch, $results_per_page, $patron); > my @newresults = @$newresultsRef; > # build the new listBiblios > my $listBiblios = buildListBiblios(\@newresults, $results_per_page); >-- >2.20.1
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 28600
:
122171
|
122207
|
122338