Bug 16518 - opac-addbybiblionumber is not plack safe
Summary: opac-addbybiblionumber is not plack safe
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 7172 16519
  Show dependency treegraph
 
Reported: 2016-05-13 19:46 UTC by Jonathan Druart
Modified: 2019-06-27 09:24 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl (1.49 KB, patch)
2016-05-13 19:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl (1.54 KB, patch)
2016-05-16 06:18 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl (1.64 KB, patch)
2016-06-04 13:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-05-13 19:46:40 UTC
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).
Comment 1 Jonathan Druart 2016-05-13 19:51:08 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2016-05-16 06:18:56 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2016-06-04 13:41:29 UTC
Created attachment 52055 [details] [review]
Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl

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>
Comment 4 Brendan Gallagher 2016-06-06 17:31:26 UTC
Pushed to Master - Should be in the November 2016 Release.  Thanks
Comment 5 Frédéric Demians 2016-06-15 07:39:26 UTC
Pushed in 16.05. Will be in 16.05.01.
Comment 6 Julian Maurice 2016-06-16 08:27:45 UTC
Patch pushed to 3.22.x, will be in 3.22.8