]> git.koha-community.org Git - koha.git/commit
Bug 17294: Make reserves_stats.pl plack safe
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Sep 2016 08:44:41 +0000 (09:44 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Fri, 14 Oct 2016 11:53:02 +0000 (13:53 +0200)
commit70ca305311cfdc7c56da5ce6cae8706d2bcacf80
tree36ccb1a3064229193ac728ea0454f98eae3e11d8
parent853644230c2e792abbced63971eedf3903b4712a
Bug 17294: Make reserves_stats.pl plack safe

Lot of errors are raised by this script under plack because of var scope
issues:

Variable "$ccodes" is not available at
/home/koha/src/reports/reserves_stats.pl line 337.
Variable "$locations" is not available at
/home/koha/src/reports/reserves_stats.pl line 338.
Variable "$itemtypes" is not available at
/home/koha/src/reports/reserves_stats.pl line 339.
Variable "$Bsort1" is not available at
/home/koha/src/reports/reserves_stats.pl line 344.
Variable "$Bsort2" is not available at
/home/koha/src/reports/reserves_stats.pl line 350.
Variable "@patron_categories" is not available at
/home/koha/src/reports/reserves_stats.pl line 356.

The lazy way to fix that is that reinit them from the subroutines they
are used.

Test plan:
Execute the report, after this patch applied you won't see the error in
the log.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f66cc4dfcca243e6210c3323586efbfbd6cfe0cd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1ade46e5a4928ffd8ae4080b0f0f09c0b564ed13)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
reports/reserves_stats.pl