Ignore:
Timestamp:
Sep 2, 2008 8:29:31 AM (5 years ago)
Author:
alec
Message:
  • fixed and re-enabled (RFC3501 [7.1]) CAPABILITY optional response use
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_imap.php

    r1664 r1713  
    6060  var $uid_id_map = array(); 
    6161  var $msg_headers = array(); 
    62   var $capabilities = array(); 
    6362  var $skip_deleted = FALSE; 
    6463  var $search_set = NULL; 
     
    132131    if ($this->conn) 
    133132      { 
    134       $this->_parse_capability($this->conn->capability); 
    135        
    136133      if (!empty($this->conn->delimiter)) 
    137134        $this->delimiter = $this->conn->delimiter; 
     
    330327  function get_capability($cap) 
    331328    { 
    332     $cap = strtoupper($cap); 
    333     return $this->capabilities[$cap]; 
     329    return iil_C_GetCapability($this->conn, strtoupper($cap)); 
    334330    } 
    335331 
     
    25792575     
    25802576    return $uid; 
    2581     } 
    2582  
    2583  
    2584   /** 
    2585    * Parse string or array of server capabilities and put them in internal array 
    2586    * @access private 
    2587    */ 
    2588   function _parse_capability($caps) 
    2589     { 
    2590     if (!is_array($caps)) 
    2591       $cap_arr = explode(' ', $caps); 
    2592     else 
    2593       $cap_arr = $caps; 
    2594      
    2595     foreach ($cap_arr as $cap) 
    2596       { 
    2597       if ($cap=='CAPABILITY') 
    2598         continue; 
    2599  
    2600       if (strpos($cap, '=')>0) 
    2601         { 
    2602         list($key, $value) = explode('=', $cap); 
    2603         if (!is_array($this->capabilities[$key])) 
    2604           $this->capabilities[$key] = array(); 
    2605            
    2606         $this->capabilities[$key][] = $value; 
    2607         } 
    2608       else 
    2609         $this->capabilities[$cap] = TRUE; 
    2610       } 
    26112577    } 
    26122578 
Note: See TracChangeset for help on using the changeset viewer.