]> git.koha-community.org Git - koha.git/commit
Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 May 2016 19:46:42 +0000 (20:46 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Mon, 6 Jun 2016 17:30:33 +0000 (17:30 +0000)
commitab1beed06f249d1e7d0be5bb1b584e62f5b48783
tree5620cea786099519108dee6372ad7fa299bf11f1
parentd9ef98b9b66440240ae9a3baadbf9b1f665e8aab
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>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
opac/opac-addbybiblionumber.pl