From 7aa962674bd7799cd302ec2afa62babad4dec93c Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Wed, 23 May 2001 20:18:57 +0000 Subject: [PATCH] Change from Ralf Becker for vcard import and mult. cats --- addressbook/edit.php | 2 +- addressbook/import.php | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/addressbook/edit.php b/addressbook/edit.php index cb8867f544..e2d0903496 100755 --- a/addressbook/edit.php +++ b/addressbook/edit.php @@ -204,7 +204,7 @@ $fields['access'] = 'public'; } - $fields['cat_id'] = $cat_id; + $fields['cat_id'] = is_array($cat_id) ? implode(',',$cat_id) : $cat_id; if (($this->grants[$check[0]['owner']] & PHPGW_ACL_EDIT) && $check[0]['owner'] != $phpgw_info['user']['account_id']) { diff --git a/addressbook/import.php b/addressbook/import.php index 7a10d87bda..f18b2f9831 100644 --- a/addressbook/import.php +++ b/addressbook/import.php @@ -157,15 +157,19 @@ { while ($data = fgets($fp,8000)) { - list($name,$value,$extra) = split(':', $data); + $data = trim($data); // RB 2001/05/07 added for Lotus Organizer + while (substr($data,-1) == '=') { // '=' at end-of-line --> line to be continued with next line + $data = substr($data,0,-1) . trim(fgets($fp,8000)); + } + if (strstr($data,';ENCODING=QUOTED-PRINTABLE')) { // RB 2001/05/07 added for Lotus Organizer + $data = quoted_printable_decode(str_replace(';ENCODING=QUOTED-PRINTABLE','',$data)); + } + list($name,$value) = explode(':', $data,2); // RB 2001/05/09 to allow ':' in Values (not only in URL's) + if (strtolower(substr($name,0,5)) == 'begin') { $buffer = $this->import_start_record($buffer); } - if (substr($value,0,5) == "http") - { - $value = $value . ":".$extra; - } if ($name && $value) { reset($this->import);