Merge branch 'master' of github.com:roundcube/roundcubemail
| | |
| | | } |
| | | } |
| | | |
| | | // Convert address(es) to rcube_vcard data |
| | | foreach ($contact as $idx => $value) { |
| | | $name = explode(':', $idx); |
| | | if (in_array($name[0], array('street', 'locality', 'region', 'zipcode', 'country'))) { |
| | | $contact['address:'.$name[1]][$name[0]] = $value; |
| | | unset($contact[$idx]); |
| | | } |
| | | } |
| | | |
| | | // Create vcard object |
| | | $vcard = new rcube_vcard(); |
| | | foreach ($contact as $name => $value) { |
| | |
| | | |
| | | $vcf_text = trim(str_replace("\r\n", "\n", $vcf_text)); |
| | | $vcard = trim(str_replace("\r\n", "\n", $vcard)); |
| | | echo $vcard; |
| | | $this->assertEquals($vcf_text, $vcard); |
| | | } |
| | | |
| | |
| | | URL;TYPE=homepage:http://page.com |
| | | URL;TYPE=other:http://webpage.tld |
| | | BDAY;VALUE=date:1970-11-15 |
| | | ADR;TYPE=home:;;Priv address;City;region;xx-xxx;USA |
| | | ADR;TYPE=work:;;Addr work;;;33-333;Poland |
| | | END:VCARD |