Summary: | acqui/parcels.pl plack scoping | ||
---|---|---|---|
Product: | Koha | Reporter: | Dobrica Pavlinusic <dpavlin> |
Component: | Acquisitions | Assignee: | Dobrica Pavlinusic <dpavlin> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | P5 - low | CC: | chris, julian.maurice, koha.sekjal, paul.poulain |
Version: | 3.8 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 8183 - acqui/parcels.pl plack scoping
[SIGNED-OFF] Bug 8183 - acqui/parcels.pl plack scoping |
Description
Dobrica Pavlinusic
2012-06-01 18:36:25 UTC
Created attachment 9892 [details] [review] Bug 8183 - acqui/parcels.pl plack scoping Scope our $template for plack to prevent following error: Can't call method "param" on an undefined value at /srv/koha_ffzg/acqui/parcels.pl line 177. Test scenario: 1. Home > Acquisitions > Search for vendor 2. click on "Receive shipment" Hmm, I can't recreate this bug I'm afraid This bug seems to be specific to bookseller=2 on our system and doesn't appear for others, so I will have to investigate a bit more why is that so. I got this one nailed down: you need to have more than 20 items pending for acquisition (or whatever number you pass in in ?resultsperpage=xx param) so that sub set_page_navigation gets called because error appears in it. Created attachment 10269 [details] [review] [SIGNED-OFF] Bug 8183 - acqui/parcels.pl plack scoping It fixes the bug, so I signoff. But it also works by passing the $template variable to the sub, which seems cleaner to me than using global variables in subs. Why did you choose this solution ? (I'm just curious :-)) I tried to always make smallest possible change to code when introducing plack scoping. Since other patches for plack use global scoping, I opted to do it consistently instead of changing method signature. Plack scoping only, safe for CGI environments, marking Passed QA. There have been no further reports of problems so I am marking this bug resolved. |