Merge branch 'master' into WebGUI8. Merged up to 7.10.4

This commit is contained in:
Colin Kuskie 2010-11-03 09:47:36 -07:00
commit 5f3014aaee
66 changed files with 3078 additions and 997 deletions

View file

@ -648,7 +648,7 @@ sub quickCSV {
my $sql = shift;
my $params = shift;
my $csv = Text::CSV_XS->new({ eol => "\n" });
my $csv = Text::CSV_XS->new({ eol => "\n", binary => 1 });
my $sth = $self->prepare($sql);
$sth->execute(@$params);
@ -656,9 +656,12 @@ sub quickCSV {
return undef unless $csv->combine($sth->getColumnNames);
my $output = $csv->string;
while (my @data = $sth->fetchrow_array) {
return undef unless $csv->combine(@data);
$output .= $csv->string;
while (my @data = $sth->array) {
if ( ! $csv->combine(@data) ) {
$self->session->log->error( "Problem creating CSV row: " . $csv->error_diag );
return undef;
}
$output .= $csv->string();
}
$sth->finish;