Fix line ending processing by the Thingy. It will now accept CSV files with any line endings. Fixes bug #11746.

This commit is contained in:
Colin Kuskie 2010-09-13 07:52:14 -07:00
parent 0d59993e45
commit 6c40adee13
4 changed files with 8 additions and 1 deletions

View file

@ -1,6 +1,7 @@
7.10.1
- fixed #11851: Story Topic: top story variables should be available all the time
- fixed #11854: CS doesn't return Not Found page
- fixed #11746: Thingy import CSV only supports one line ending
7.10.0
- fixed #11812: Checking www_ajaxSave's response in the cart js, urlencoding post parameters

View file

@ -21,6 +21,10 @@ save you many hours of grief.
Account Macro template
Admin Toggle Macro template
7.10.1
--------------------------------------------------------------------
* WebGUI now depends on PerlIO::eol, for doing line ending translation.
7.10.0
--------------------------------------------------------------------
* Due to a bug in the 7.8.24-7.9.11 upgrade, the ordering of template

View file

@ -17,6 +17,7 @@ use WebGUI::International;
use WebGUI::Text;
use WebGUI::Form::File;
use WebGUI::DateTime;
use PerlIO::eol qw/NATIVE/;
use Moose;
use WebGUI::Definition::Asset;
@ -2797,7 +2798,7 @@ sub www_import {
next unless ($storage->getFileExtension($file) eq "csv");
$error->info("Found import file $file");
open my $importFile,"<",$storage->getPath($file);
open my $importFile,"<:raw:eol(NATIVE)",$storage->getPath($file);
my $lineNumber = 0;
my @data = ();

View file

@ -156,6 +156,7 @@ checkModule('IO::Socket::SSL', );
checkModule('Package::Stash', );
checkModule('HTTP::Exception', );
checkModule('Net::Twitter', "3.13006" );
checkModule('PerlIO::eol', "0.14" );
checkModule('Number::Format', );
checkModule('Email::Valid', );
checkModule('Facebook::Graph', '0.0505' );