Bug 16199 - C4::Ris::charconv is one of the less useful subroutines ever written
Summary: C4::Ris::charconv is one of the less useful subroutines ever written
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 16191
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-05 06:49 UTC by Jonathan Druart
Modified: 2017-12-07 22:18 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 16199: Remove C4::Ris::charconv (5.54 KB, patch)
2016-04-05 06:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16199: Remove C4::Ris::charconv (5.68 KB, patch)
2016-04-05 13:11 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 16199: Remove C4::Ris::charconv (5.73 KB, patch)
2016-04-05 14:34 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-04-05 06:49:41 UTC
I let you admire it:

sub charconv {
    if ($utf) {
       ## return unaltered if already utf-8
       return @_;
    }
    elsif (my $uniout eq "t") {
       ## convert to utf-8
       return marc8_to_utf8("@_");
    }
    else {
       ## return unaltered if no utf-8 requested
       return @_;
    }
}
Comment 1 Jonathan Druart 2016-04-05 06:55:22 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2016-04-05 13:11:26 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi (tcohen) 2016-04-05 14:34:59 UTC
Created attachment 49916 [details] [review]
Bug 16199: Remove C4::Ris::charconv

This subroutine always returns what has been sent in parameter.
It is unecessary and can be removed.

Test plan:
  prove t/Ris.t
should not be noisy

Export a catalogue record in Ris should generate the same file with and
without this patch

NOTE: With/Without were identical in my testing.
      t/Ris.t is nicely silenced.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Brendan Gallagher 2016-04-07 00:00:17 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!
Comment 5 Julian Maurice 2016-06-16 08:54:02 UTC
Patch pushed to 3.22.x, will be in 3.22.8