]> 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)
committerFrédéric Demians <f.demians@tamil.fr>
Fri, 30 Sep 2016 08:43:57 +0000 (10:43 +0200)
commit1ade46e5a4928ffd8ae4080b0f0f09c0b564ed13
treeb1bb570ec2cffef856b1be901271ea03c873fc39
parent656a25e39cac5ecca5c95dd9b2ae65648d474528
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>
reports/reserves_stats.pl