From: jakubvrana Date: Mon, 13 Jul 2009 22:33:06 +0000 (+0000) Subject: Simplify import quotes removal X-Git-Tag: v3.0.0~707 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=67b4653c2d90734ec118b1f11d2ffeb30dcd9f4e;p=adminer.git Simplify import quotes removal git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@820 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- 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) . ")"; }