]> 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)
committerFrédéric Demians <f.demians@tamil.fr>
Wed, 15 Jun 2016 06:15:54 +0000 (08:15 +0200)
commit2729f038c34b5c4f0b713738c9bf4a94068f1b43
tree63fde579fe61b0f5f2b12b5155f76848be3c29e4
parente242625721b0dcd68cd7b3408ef9da5d367a878d
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>
opac/opac-addbybiblionumber.pl