Changeset 2b5c123 in github


Ignore:
Timestamp:
Dec 12, 2008 6:57:20 AM (4 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
cf6bc5d
Parents:
f50cc72
Message:

#1485622: fix rcube_imap::message_index() to return always messages IDs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap.php

    r0b5539e r2b5c123  
    108108    $IMAP_USE_INTERNAL_DATE = false; 
    109109 
    110     $this->conn = iil_Connect($host, $user, $pass, array('imap' => $auth_type ? $auth_type : 'check')); 
     110    // set connection options 
     111    $options['imap'] = $auth_type ? $auth_type : 'check'; 
     112 
     113    // Setting root and delimiter before iil_Connect can save time detecting them 
     114    // using NAMESPACE and LIST  
     115    if (is_string($imap_root = rcmail::get_instance()->config->get('imap_root')))  
     116        $options['rootdir'] = $imap_root; 
     117    if($imap_delimiter = rcmail::get_instance()->config->get('imap_delimiter')) 
     118        $options['delimiter'] = $imap_delimiter; 
     119 
     120    $this->conn = iil_Connect($host, $user, $pass, $options); 
    111121    $this->host = $host; 
    112122    $this->user = $user; 
     
    812822    if (!isset($this->cache[$key]) && $this->search_string && $mailbox == $this->mailbox) 
    813823    { 
    814       $this->cache[$key] = $a_msg_headers = array(); 
     824      $this->cache[$key] = array(); 
    815825       
    816826      if ($this->get_capability('sort')) 
     
    833843          arsort($a_index); 
    834844 
    835         $this->cache[$key] = $a_index; 
     845        $this->cache[$key] = array_keys($a_index); 
    836846        } 
    837847    } 
     
    849859      { 
    850860      $a_index = $this->get_message_cache_index($cache_key, TRUE, $this->sort_field, $this->sort_order); 
    851       return array_values($a_index); 
    852       } 
    853  
     861      return array_keys($a_index); 
     862      } 
    854863 
    855864    // fetch complete message index 
     
    871880        arsort($a_index); 
    872881         
    873       $this->cache[$key] = $a_index; 
     882      $this->cache[$key] = array_keys($a_index); 
    874883      } 
    875884 
Note: See TracChangeset for help on using the changeset viewer.