Fix special case of Excel export with ; at the end (bug #1511046).

This commit is contained in:
Michal Čihař
2006-06-27 08:56:46 +00:00
parent f92275d136
commit 250575b854
2 changed files with 13 additions and 4 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog
$Id$
$Source$
2006-06-27 Michal Čihař <michal@cihar.com>
* libraries/import/csv.php: Fix special case of Excel export with ; at the
end (bug #1511046).
2006-06-25 Marc Delisle <lem9@users.sourceforge.net>
* libraries/export/pdf.php, libraries/plugin_interface.lib.php, lang/*:
bug #1504218: display an explanation for what is a PDF export

View File

@@ -236,10 +236,15 @@ if ($plugin_param == 'table') {
}
// Do we have correct count of values?
if (count($values) != $required_fields) {
$message = sprintf($strInvalidCSVFieldCount, $line);
$show_error_header = TRUE;
$error = TRUE;
break;
// Hack for excel
if ($values[count($values) - 1] == ';') {
unset($values[count($values) - 1]);
} else {
$message = sprintf($strInvalidCSVFieldCount, $line);
$show_error_header = TRUE;
$error = TRUE;
break;
}
}
$first = TRUE;