roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.78k stars 1.62k forks source link

incorrect import or display of Outlook produced .vcf #1857

Closed rcubetrac closed 15 years ago

rcubetrac commented 15 years ago

Reported by tensor on 4 Oct 2008 20:02 UTC as Trac ticket #1485453

See the screenshot. There are some remnants of serialize() call.

Migrated-From: http://trac.roundcube.net/ticket/1485453

rcubetrac commented 15 years ago

Comment by tensor on 4 Oct 2008 20:05 UTC

Steps to generate such a file in Outlook 2007:

  1. Right click in contact.
  2. Choose "Send Full Contact"->"In Internet Format (vCard)"
  3. New message will be open with attached .vcf
  4. Right on .vcf and choose "Save As..."
rcubetrac commented 15 years ago

Owner changed by tensor on 4 Oct 2008 20:06 UTC

=> none

rcubetrac commented 15 years ago

Comment by tensor on 5 Oct 2008 14:48 UTC

The real fix is this:

=== program/include/rcube_vcard.php
==================================================================
--- program/include/rcube_vcard.php (revision 2003)
+++ program/include/rcube_vcard.php (local)
@@ -65,9 +65,9 @@

     // find well-known address fields
     $this->displayname = $this->raw[   $this->surname = $this->raw['N']('FN'][0];
-)[   $this->firstname = $this->raw['N'](0][0];
-)[   $this->middlename = $this->raw['N'](0][1];
-)[   $this->surname = $this->raw['N'](0][2];
+)[   $this->firstname = $this->raw['N'](0][0][0];
+)[   $this->middlename = $this->raw['N'](0][0][1];
+)[    $this->nickname = $this->raw['NICKNAME'](0][0][2];
)[    $this->organization = $this->raw['ORG'](0];
)[    $this->business = ($this->raw['X-ABShowAs'](0];
)[== 'COMPANY') || (join(_, (array)$this->raw['N'](0])[0]) == _ && !empty($this->organization));

The patch contains some Rename refactorings to better understand the relevant parts of code.

rcubetrac commented 15 years ago

Owner changed by @alecpl on 18 Dec 2008 17:13 UTC

=> thomasb

rcubetrac commented 15 years ago

Comment by @alecpl on 20 Jul 2009 11:09 UTC

Fixed in 93af155f.

rcubetrac commented 15 years ago

Status changed by @alecpl on 20 Jul 2009 11:09 UTC

new => closed