summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-03-24 18:00:17 +0100
committerAleksander Machniak <alec@alec.pl>2013-03-24 18:01:29 +0100
commitae0821f1dd15baacd436d3337eb26a41d72204d0 (patch)
treebf0fafb4964c5e3c110d99f7b846fe163ee62152 /program/lib/Roundcube
parent1f8fbf945526f0fdeae5e291133acf6b77f7356b (diff)
Be less restrictive on vCard import, do not require FN when N exists
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_vcard.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_vcard.php b/program/lib/Roundcube/rcube_vcard.php
index de28767f8..54bb9521d 100644
--- a/program/lib/Roundcube/rcube_vcard.php
+++ b/program/lib/Roundcube/rcube_vcard.php
@@ -491,7 +491,9 @@ class rcube_vcard
if (preg_match('/^END:VCARD$/i', $line)) {
// parse vcard
$obj = new rcube_vcard(self::cleanup($vcard_block), $charset, true, self::$fieldmap);
- if (!empty($obj->displayname) || !empty($obj->email)) {
+ // FN and N is required by vCard format (RFC 2426)
+ // on import we can be less restrictive, let's addressbook decide
+ if (!empty($obj->displayname) || !empty($obj->surname) || !empty($obj->firstname) || !empty($obj->email)) {
$out[] = $obj;
}