Bugzilla – Attachment 38494 Details for
Bug 11790
C4::Charset should not depend on C4::Context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11790: Remove dependency C4::Context from C4::Charset
Bug-11790-Remove-dependency-C4Context-from-C4Chars.patch (text/plain), 1.19 KB, created by
Jonathan Druart
on 2015-04-24 15:06:39 UTC
(
hide
)
Description:
Bug 11790: Remove dependency C4::Context from C4::Charset
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-24 15:06:39 UTC
Size:
1.19 KB
patch
obsolete
>From c440a06214db37922af00a7f6c5d99d58b9cfdcb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 24 Apr 2015 17:03:09 +0200 >Subject: [PATCH] Bug 11790: Remove dependency C4::Context from C4::Charset > >C4::Context is only used to retrieve a syspref value. >This patch moves the use of C4::Context to a require. > >Test plan: >Try to reach the SetMarcUnicodeFlag subroutine (batchmod, add/update a biblio, etc.) >--- > C4/Charset.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Charset.pm b/C4/Charset.pm >index 41a8d83..667c2d2 100644 >--- a/C4/Charset.pm >+++ b/C4/Charset.pm >@@ -22,7 +22,6 @@ use warnings; > > use MARC::Charset qw/marc8_to_utf8/; > use Text::Iconv; >-use C4::Context; > use C4::Debug; > use Unicode::Normalize; > use Encode qw( decode encode is_utf8 ); >@@ -333,6 +332,7 @@ sub SetMarcUnicodeFlag { > substr($leader, 9, 1) = 'a'; > $marc_record->leader($leader); > } elsif ($marc_flavour =~/UNIMARC/) { >+ require C4::Context; > my $defaultlanguage = C4::Context->preference("UNIMARCField100Language"); > $defaultlanguage = "fre" if (!$defaultlanguage || length($defaultlanguage) != 3); > my $string; >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11790
:
38494
|
39239
|
39958