]> 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)
committerJulian Maurice <julian.maurice@biblibre.com>
Thu, 16 Jun 2016 08:27:30 +0000 (10:27 +0200)
commit37a0ba4f1079e9874684b01dad12203519e8cfe3
tree2658b960c14d0f447f7e0cc47bd51aa243cd94fe
parent825d4961940ff069d50e0ded05c4c5f2187afe98
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>
(cherry picked from commit ab1beed06f249d1e7d0be5bb1b584e62f5b48783)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2729f038c34b5c4f0b713738c9bf4a94068f1b43)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
opac/opac-addbybiblionumber.pl