[Svn] r3863 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Wed Aug 4 10:15:26 CEST 2010


Author: alec
Date: 2010-08-04 03:15:17 -0500 (Wed, 04 Aug 2010)
New Revision: 3863

Modified:
   trunk/roundcubemail/program/include/rcube_vcard.php
Log:
- Support vCards without or with an empty FN


Modified: trunk/roundcubemail/program/include/rcube_vcard.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_vcard.php	2010-08-03 19:38:22 UTC (rev 3862)
+++ trunk/roundcubemail/program/include/rcube_vcard.php	2010-08-04 08:15:17 UTC (rev 3863)
@@ -86,6 +86,13 @@
       $this->email[0] = $this->email[$pref_index];
       $this->email[$pref_index] = $tmp;
     }
+
+    // make sure displayname is not empty (required by RFC2426)
+    if (!strlen($this->displayname)) {
+      // the same method is used in steps/mail/addcontact.inc
+      $this->displayname = ucfirst(preg_replace('/[\.\-]/', ' ',
+        substr($this->email[0], 0, strpos($this->email[0], '@'))));
+    }
   }
 
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list