Bugzilla – Attachment 52055 Details for
Bug 16518
opac-addbybiblionumber is not plack safe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl
Bug-16518-Fix-Plack-variable-scoping-problem-in-op.patch (text/plain), 1.64 KB, created by
Marcel de Rooy
on 2016-06-04 13:41:29 UTC
(
hide
)
Description:
Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-06-04 13:41:29 UTC
Size:
1.64 KB
patch
obsolete
>From ab702d1f5752a3dfb02cd67462cf90445c3e8333 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 13 May 2016 20:46:42 +0100 >Subject: [PATCH] Bug 16518: Fix Plack variable scoping problem in > opac-addbybiblionumber.pl >Content-Type: text/plain; charset=utf-8 > >The script opac/opac-addbybiblionumber.pl is not plack safe because the >variable @biblios is declared with our and is not assigned to an empty >array (so not reset). > >The issue: >When trying to add items to a list (virtualshelf), the biblionumbers are >added to the @biblios variable and the list is not reset between each >run. > >Test plan: >Check from records from the result list and add them >to a list. >Cancel or save and re-add them (or others) to a list (same or >different). >=> Without this patch, the list of records will never stop growing, the >previous items added are still listed when adding new ones. >=> With this patch, the behavior is the one expected. > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > opac/opac-addbybiblionumber.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl >index eec38bd..a5decf7 100755 >--- a/opac/opac-addbybiblionumber.pl >+++ b/opac/opac-addbybiblionumber.pl >@@ -38,7 +38,7 @@ our $newvirtualshelf = $query->param('newvirtualshelf'); > our $category = $query->param('category'); > our $authorized = 1; > our $errcode = 0; >-our @biblios; >+our @biblios = (); > > # if virtualshelves is disabled, leave immediately > if ( ! C4::Context->preference('virtualshelves') ) { >-- >1.7.10.4
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 16518
:
51483
|
51513
| 52055