Changeset 5160 in subversion


Ignore:
Timestamp:
Sep 5, 2011 3:40:18 AM (21 months ago)
Author:
thomasb
Message:

Fix wrong vCard type parameter mobile (#1488067)

Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r5159 r5160  
    22=========================== 
    33 
     4- Fixed wrong vCard type parameter mobile (#1488067) 
    45- Fixed vCard WORKFAX issue (#1488046) 
    56- Add vCard's Profile URL support (#1488062) 
  • trunk/roundcubemail/program/include/rcube_vcard.php

    r5159 r5160  
    5252  ); 
    5353  private $typemap = array('iPhone' => 'mobile', 'CELL' => 'mobile', 'WORK,FAX' => 'workfax'); 
    54   private $phonetypemap = array('HOME1' => 'HOME', 'BUSINESS1' => 'WORK', 'BUSINESS2' => 'WORK2', 'BUSINESSFAX' => 'WORK,FAX', 'WORKFAX' => 'WORK,FAX'); 
     54  private $phonetypemap = array('HOME1' => 'HOME', 'BUSINESS1' => 'WORK', 'BUSINESS2' => 'WORK2', 'BUSINESSFAX' => 'WORK,FAX'); 
    5555  private $addresstypemap = array('BUSINESS' => 'WORK'); 
    5656  private $immap = array('X-JABBER' => 'jabber', 'X-ICQ' => 'icq', 'X-MSN' => 'msn', 'X-AIM' => 'aim', 'X-YAHOO' => 'yahoo', 'X-SKYPE' => 'skype', 'X-SKYPE-USERNAME' => 'skype'); 
     
    253253  { 
    254254    $field = strtolower($field); 
    255     $type = strtoupper($type); 
     255    $type_uc = strtoupper($type); 
    256256    $typemap = array_flip($this->typemap); 
    257257 
     
    302302 
    303303      case 'email': 
    304         $this->raw['EMAIL'][] = array(0 => $value, 'type' => array_filter(array('INTERNET', $type))); 
     304        $this->raw['EMAIL'][] = array(0 => $value, 'type' => array_filter(array('INTERNET', $type_uc))); 
    305305        $this->email[] = $value; 
    306306        break; 
     
    319319 
    320320      case 'address': 
    321         if ($this->addresstypemap[$type]) 
    322           $type = $this->addresstypemap[$type]; 
     321        if ($this->addresstypemap[$type_uc]) 
     322          $type = $this->addresstypemap[$type_uc]; 
    323323 
    324324        $value = $value[0] ? $value : array('', '', $value['street'], $value['locality'], $value['region'], $value['zipcode'], $value['country']); 
     
    329329 
    330330      default: 
    331         if ($field == 'phone' && $this->phonetypemap[$type]) 
    332           $type = $this->phonetypemap[$type]; 
     331        if ($field == 'phone' && $this->phonetypemap[$type_uc]) 
     332          $type = $this->phonetypemap[$type_uc]; 
    333333 
    334334        if (($tag = self::$fieldmap[$field]) && (is_array($value) || strlen($value))) { 
Note: See TracChangeset for help on using the changeset viewer.