Skip to content
Snippets Groups Projects
Commit 197086a9 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Make it possible to import files using CR as eol.

parent 747b7fbb
Branches
No related tags found
No related merge requests found
......@@ -10,6 +10,9 @@ ob_start();
OCP\JSON::checkLoggedIn();
OCP\App::checkAppEnabled('contacts');
session_write_close();
$cr = "\r";
$nl = "\n";
$progressfile = 'import_tmp/' . md5(session_id()) . '.txt';
......@@ -52,6 +55,10 @@ writeProgress('20');
$searchfor = array('VCARD');
$parts = $searchfor;
$filearr = explode($nl, $file);
if(count($filearr) == 1) { // Mac eol
$filearr = explode($cr, $file);
}
$inelement = false;
$parts = array();
$i = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment