mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 17:44:07 +02:00
Use atomic group for CSV regexp
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1329 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -98,7 +98,7 @@ if ($_POST && !$error) {
|
|||||||
$file = preg_replace("~^\xEF\xBB\xBF~", '', $file); //! character set
|
$file = preg_replace("~^\xEF\xBB\xBF~", '', $file); //! character set
|
||||||
$result = true;
|
$result = true;
|
||||||
$cols = array_keys($fields);
|
$cols = array_keys($fields);
|
||||||
preg_match_all('~("[^"]*"|[^"\\r\\n])+~', $file, $matches);
|
preg_match_all('~(?>"[^"]*"|[^"\\r\\n]+)+~', $file, $matches);
|
||||||
$affected = count($matches[0]);
|
$affected = count($matches[0]);
|
||||||
queries("START TRANSACTION");
|
queries("START TRANSACTION");
|
||||||
foreach ($matches[0] as $key => $val) {
|
foreach ($matches[0] as $key => $val) {
|
||||||
|
Reference in New Issue
Block a user