Bugzilla – Attachment 5023 Details for
Bug 6723
allow framework import with CRLF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6723 : import-framework-crlf
Bug-6723--import-framework-crlf.patch (text/plain), 1.36 KB, created by
Chris Cormack
on 2011-08-15 21:41:36 UTC
(
hide
)
Description:
Bug 6723 : import-framework-crlf
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-08-15 21:41:36 UTC
Size:
1.36 KB
patch
obsolete
>From 91a8202ae3926730c6c8689fc62678ccfdd8cb6e Mon Sep 17 00:00:00 2001 >From: Ward van Wanrooij <wvanwanrooij@nextfactory.nl> >Date: Mon, 15 Aug 2011 14:38:40 +0200 >Subject: [PATCH] Bug 6723 : import-framework-crlf > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/ImportExportFramework.pm | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/ImportExportFramework.pm b/C4/ImportExportFramework.pm >index 7f29e51..cc17462 100755 >--- a/C4/ImportExportFramework.pm >+++ b/C4/ImportExportFramework.pm >@@ -761,7 +761,7 @@ sub _parseSQLLine > my $line; > my $numLines = 0; > while (<$dom>) { >- chomp $_; >+ s/[\r\n]+$//; > $line = $_; > # we don't want to execute any sql statement, only the ones dealing with frameworks > next unless ($line =~ /^\s*(?i:DELETE\s+FROM|INSERT\s+INTO)\s+(?:marc_tag_structure|marc_subfield_structure)/); >@@ -1148,7 +1148,7 @@ sub _import_table_csv > if ($row =~ /(?:".*?",?)+/) { > @arrData = split('","', $row); > $arrData[0] = substr($arrData[0], 1) if ($arrData[0] =~ /^"/); >- chomp $arrData[$#arrData]; >+ $arrData[$#arrData] =~ s/[\r\n]+$//; > chop $arrData[$#arrData] if ($arrData[$#arrData] =~ /"$/); > if (@arrData) { > if ($arrData[0] eq '#-#' && $arrData[$#arrData] eq '#-#') { >-- >1.7.4.1
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 6723
:
5018
| 5023