Bugzilla – Attachment 25498 Details for
Bug 11478
Remove experimental given/when from Koha::SimpleMARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11478 Replace experimental given/when keywords
Bug-11478-Replace-experimental-givenwhen-keywords.patch (text/plain), 1.62 KB, created by
Jonathan Druart
on 2014-02-20 13:25:59 UTC
(
hide
)
Description:
Bug 11478 Replace experimental given/when keywords
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-02-20 13:25:59 UTC
Size:
1.62 KB
patch
obsolete
>From 7f147da687c72c7225c1f9f32300da9d98f036ed Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Mon, 6 Jan 2014 11:53:29 +0000 >Subject: [PATCH] Bug 11478 Replace experimental given/when keywords > >The keywords given and when are flagged experimental >in perl 5.18 and subject to change >replace the construct by an if/elsif > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > Koha/SimpleMARC.pm | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > >diff --git a/Koha/SimpleMARC.pm b/Koha/SimpleMARC.pm >index 2195143..3ffe768 100644 >--- a/Koha/SimpleMARC.pm >+++ b/Koha/SimpleMARC.pm >@@ -88,21 +88,19 @@ sub copy_field { > $modifiers .= $modifier > if grep {/$modifier/} @available_modifiers; > } >- foreach my $value ( @values ) { >- for ( $modifiers ) { >- when ( /^(ig|gi)$/ ) { >+ foreach my $value (@values) { >+ if ( $modifiers =~ m/^(ig|gi)$/ ) { > $value =~ s/$regex->{search}/$regex->{replace}/ig; >- } >- when ( /^i$/ ) { >+ } >+ elsif ( $modifiers eq 'i' ) { > $value =~ s/$regex->{search}/$regex->{replace}/i; >- } >- when ( /^g$/ ) { >+ } >+ elsif ( $modifiers eq 'g' ) { > $value =~ s/$regex->{search}/$regex->{replace}/g; >- } >- default { >+ } >+ else { > $value =~ s/$regex->{search}/$regex->{replace}/; >- } >- } >+ } > } > } > update_field( $record, $toFieldName, $toSubfieldName, $dont_erase, @values ); >-- >1.7.10.4
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 11478
:
23929
|
25355
| 25498