diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-07-08 18:28:55 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-07-08 18:28:55 +0200 |
commit | dc8193fccb7f18435844a3f5d2e79d27b6b7f0a3 (patch) | |
tree | 34959926ac2a6bbad586c6a7d895ad7fc6de934c /apps | |
parent | 334257d2b64fb9690ded42a747e4abca1ffbb1bf (diff) | |
download | nextcloud-server-dc8193fccb7f18435844a3f5d2e79d27b6b7f0a3.tar.gz nextcloud-server-dc8193fccb7f18435844a3f5d2e79d27b6b7f0a3.zip |
Make it possible to import files using CR as eol.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/contacts/import.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/contacts/import.php b/apps/contacts/import.php index 22f33d71576..93c47ef2667 100644 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -12,6 +12,7 @@ OCP\JSON::checkLoggedIn(); OCP\App::checkAppEnabled('contacts'); session_write_close(); +$cr = "\r"; $nl = "\n"; global $progresskey; @@ -56,6 +57,10 @@ if(isset($_POST['method']) && $_POST['method'] == 'new'){ //analyse the contacts file writeProgress('40'); $lines = explode($nl, $file); +if(count($lines) == 1) { // Mac eol + $lines = explode($cr, $file); +} + $inelement = false; $parts = array(); $card = array(); |