]> 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)
committerKyle M Hall <kyle@bywatersolutions.com>
Sun, 25 Sep 2016 13:44:58 +0000 (13:44 +0000)
commitf66cc4dfcca243e6210c3323586efbfbd6cfe0cd
treef2a561e6879a791c7b14af64c39aaa9c3733e579
parentb1daa66aadead2fb781cd3ba2d71592e73a57ec2
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>
reports/reserves_stats.pl