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:
parent
f68a886367
commit
67b4653c2d
|
@ -142,7 +142,7 @@ if ($_POST && !$error) {
|
||||||
$cols = " (" . implode(", ", array_map('idf_escape', $matches2[1])) . ")";
|
$cols = " (" . implode(", ", array_map('idf_escape', $matches2[1])) . ")";
|
||||||
} else {
|
} else {
|
||||||
foreach ($matches2[1] as $col) {
|
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) . ")";
|
$rows[] = "\n(" . implode(", ", $row) . ")";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue