From 67b4653c2d90734ec118b1f11d2ffeb30dcd9f4e Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Mon, 13 Jul 2009 22:33:06 +0000 Subject: [PATCH] Simplify import quotes removal git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@820 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/select.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index d20ab640..3cd263b6 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -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) . ")"; }