Simplify import quotes removal

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@820 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2009-07-13 22:33:06 +00:00
parent f68a886367
commit 67b4653c2d

View file

@ -142,7 +142,7 @@ if ($_POST && !$error) {
$cols = " (" . implode(", ", array_map('idf_escape', $matches2[1])) . ")";
} else {
foreach ($matches2[1] as $col) {
$row[] = (!strlen($col) ? "NULL" : $dbh->quote(str_replace('""', '"', preg_replace('~^"(.*)"$~s', '\\1', $col))));
$row[] = (!strlen($col) ? "NULL" : $dbh->quote(str_replace('""', '"', preg_replace('~^"|"$~', '', $col))));
}
$rows[] = "\n(" . implode(", ", $row) . ")";
}