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 ad461d5ba3
commit f17623624e
4 changed files with 8 additions and 1 deletions

View file

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

View file

@ -7,6 +7,10 @@ upgrading from one version to the next, or even between multiple
versions. Be sure to heed the warnings contained herein as they will versions. Be sure to heed the warnings contained herein as they will
save you many hours of grief. save you many hours of grief.
7.10.1
--------------------------------------------------------------------
* WebGUI now depends on PerlIO::eol, for doing line ending translation.
7.10.0 7.10.0
-------------------------------------------------------------------- --------------------------------------------------------------------
* Due to a bug in the 7.8.24-7.9.11 upgrade, the ordering of template * Due to a bug in the 7.8.24-7.9.11 upgrade, the ordering of template

View file

@ -20,6 +20,7 @@ use WebGUI::Form::File;
use WebGUI::DateTime; use WebGUI::DateTime;
use base 'WebGUI::Asset::Wobject'; use base 'WebGUI::Asset::Wobject';
use Data::Dumper; use Data::Dumper;
use PerlIO::eol qw/NATIVE/;
#------------------------------------------------------------------- #-------------------------------------------------------------------
@ -2855,7 +2856,7 @@ sub www_import {
next unless ($storage->getFileExtension($file) eq "csv"); next unless ($storage->getFileExtension($file) eq "csv");
$error->info("Found import file $file"); $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 $lineNumber = 0;
my @data = (); my @data = ();

View file

@ -144,6 +144,7 @@ checkModule("Cache::FastMmap", "1.35" );
checkModule("CHI", "0.34" ); checkModule("CHI", "0.34" );
checkModule('IO::Socket::SSL', ); checkModule('IO::Socket::SSL', );
checkModule('Net::Twitter', "3.13006" ); checkModule('Net::Twitter', "3.13006" );
checkModule('PerlIO::eol', "0.14" );
failAndExit("Required modules are missing, running no more checks.") if $missingModule; failAndExit("Required modules are missing, running no more checks.") if $missingModule;