]> git.joonet.de Git - adminer.git/commitdiff
Simplify import quotes removal
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 13 Jul 2009 22:33:06 +0000 (22:33 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 13 Jul 2009 22:33:06 +0000 (22:33 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@820 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/select.inc.php

index d20ab640642b362ba01586f111bd74ce080948aa..3cd263b6a3fe01152e0bb747f2d6199e6fdb8f73 100644 (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) . ")";
                        }