1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Make it possible to import files using CR as eol.

This commit is contained in:
Thomas Tanghus 2012-07-08 18:28:55 +02:00
parent 3273d19321
commit 0f8152ff77

View File

@ -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;