Bugzilla – Attachment 5018 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]
patch to allow CRLF line endings on framework import
0001-import-framework-crlf.patch (text/plain), 1.33 KB, created by
Ward van Wanrooij
on 2011-08-15 13:01:31 UTC
(
hide
)
Description:
patch to allow CRLF line endings on framework import
Filename:
MIME Type:
Creator:
Ward van Wanrooij
Created:
2011-08-15 13:01:31 UTC
Size:
1.33 KB
patch
obsolete
>From 8e9cbf5164abe041cdc0ef864e04b563a5e04ece 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] import-framework-crlf >Content-Type: text/plain; charset="utf-8" > >--- > 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.6 >
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