Bugzilla – Attachment 122338 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.57 KB, created by
Marcel de Rooy
on 2021-06-23 14:21:33 UTC
(
hide
)
Description:
Bug 28600: Resolve variable scope issue
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-06-23 14:21:33 UTC
Size:
2.57 KB
patch
obsolete
>From 073f5745195722f87b93a8efa7131de92863ece0 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 >Content-Type: text/plain; charset=utf-8 > >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> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 1b7f98f64d..249de81618 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