Merge pull request #765 from slimtim/bug_4153

When importing a SQL file convert \r line-endings to \n
This commit is contained in:
Marc Delisle 2013-11-21 04:16:11 -08:00
commit ca053deb24

View File

@ -189,6 +189,11 @@ class ImportSql extends ImportPlugin
continue;
}
}
// Convert CR (but not CRLF) to LF otherwise all queries
// may not get executed on some platforms
$buffer = preg_replace("/\r($|[^\n])/", "\n$1", $buffer);
// Current length of our buffer
$len = strlen($buffer);