Bug 16442

Summary: C4::Ris is not plack safe
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: abl, brendan, f.demians, julian.maurice, m.de.rooy
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 7172, 16668    
Attachments: Bug 16442: C4::Ris is not plack safe
Bug 16442: Make C4::Ris plack safe
Bug 16442: Make C4::Ris plack safe
Bug 16442: Make C4::Ris plack safe

Description Jonathan Druart 2016-05-04 18:53:43 UTC
C4::Ris incorrectly uses 4 package variables:
- $utf: not used, can be removed
- $intype: set to marcflavour once, but later it assumes that it is usmarc if not defined
our $marcprint: always 0, so set it to 0
our $protoyear: only used in 1 subroutine, let's define it at this level
Comment 1 Jonathan Druart 2016-05-04 19:04:48 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-05-04 19:10:42 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2016-05-25 13:08:51 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2016-06-03 13:32:29 UTC
Created attachment 52005 [details] [review]
Bug 16442: Make C4::Ris plack safe

C4::Ris incorrectly uses 4 package variables:
- $utf: not used, can be removed
- $intype: set to marcflavour once, but later it assumes that it is
  usmarc if not defined
- $marcprint: always 0, so set it to 0
- $protoyear: only used in 1 subroutine, let's define it at this
  level

Test plan:
Just make sure the RIS export works as before this patch

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Brendan Gallagher 2016-06-03 13:51:40 UTC
Pushed to Master - Should be in the November 2016 release. Thanks!
Comment 6 Jonathan Druart 2016-06-07 11:31:23 UTC
2 tests from t/Ris.t now fail.
See bug 16668 for a fix.
Comment 7 Frédéric Demians 2016-06-15 07:37:23 UTC
Pushed in 16.05. Will be in 16.05.01.
Comment 8 Julian Maurice 2016-06-16 08:06:13 UTC
Patch pushed to 3.22.x, will be in 3.22.8