Fix importing files without trailing new line (bug #1473944).
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2006-04-21 Michal Čihař <michal@cihar.com>
|
||||||
|
* libraries/import/csv.php: Fix importing files without trailing new line
|
||||||
|
(bug #1473944).
|
||||||
|
|
||||||
2006-04-20 Michal Čihař <michal@cihar.com>
|
2006-04-20 Michal Čihař <michal@cihar.com>
|
||||||
* index.php: Check target against goto_whitelist.
|
* index.php: Check target against goto_whitelist.
|
||||||
* libraries/url_generating.lib.php, libraries/session.inc.php,
|
* libraries/url_generating.lib.php, libraries/session.inc.php,
|
||||||
|
@@ -191,14 +191,17 @@ if ($plugin_param == 'table') {
|
|||||||
}
|
}
|
||||||
// Need to strip trailing enclosing char?
|
// Need to strip trailing enclosing char?
|
||||||
if ($need_end && $ch == $csv_enclosed) {
|
if ($need_end && $ch == $csv_enclosed) {
|
||||||
if ($i == $len - 1) {
|
if ($finished && $i == $len - 1) {
|
||||||
|
$ch = NULL;
|
||||||
|
} elseif ($i == $len - 1) {
|
||||||
$i = $fallbacki;
|
$i = $fallbacki;
|
||||||
$ch = $buffer[$i];
|
$ch = $buffer[$i];
|
||||||
break;
|
break;
|
||||||
}
|
} else {
|
||||||
$i++;
|
$i++;
|
||||||
$ch = $buffer[$i];
|
$ch = $buffer[$i];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Are we at the end?
|
// Are we at the end?
|
||||||
if ($ch == $csv_new_line || ($csv_new_line == 'auto' && ($ch == "\r" || $ch == "\n")) || ($finished && $i == $len - 1)) {
|
if ($ch == $csv_new_line || ($csv_new_line == 'auto' && ($ch == "\r" || $ch == "\n")) || ($finished && $i == $len - 1)) {
|
||||||
$csv_finish = TRUE;
|
$csv_finish = TRUE;
|
||||||
|
Reference in New Issue
Block a user