Changeset d8c440c in github


Ignore:
Timestamp:
Mar 24, 2010 10:45:49 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
13540e0
Parents:
02e2b43
Message:
  • Added 'imap_force_caps' option for after-login CAPABILITY checking (#1485750)
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rd50b857 rd8c440c  
    22=========================== 
    33 
     4- Added 'imap_force_caps' option for after-login CAPABILITY checking (#1485750) 
    45- Password: Support dovecotpw encryption 
    56- TinyMCE 3.3.1 
  • config/main.inc.php.dist

    r3e34297 rd8c440c  
    7575$rcmail_config['imap_root'] = null; 
    7676$rcmail_config['imap_delimiter'] = null; 
     77 
     78// By default IMAP capabilities are readed after connection to IMAP server 
     79// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list 
     80// after login. Set to True if you've got this case. 
     81$rcmail_config['imap_force_caps'] = false; 
    7782 
    7883// ---------------------------------- 
  • program/include/rcmail.php

    rf52c936f rd8c440c  
    427427      'rootdir' => isset($_SESSION['imap_root']) ? $_SESSION['imap_root'] : $this->config->get('imap_root'), 
    428428      'debug_mode' => (bool) $this->config->get('imap_debug', 0), 
     429      'force_caps' => (bool) $this->config->get('imap_force_caps'), 
    429430    ); 
    430431 
  • program/lib/imap.inc

    rcff8861 rd8c440c  
    390390} 
    391391 
    392 function iil_ClearCapability() 
     392function iil_C_ClearCapability($conn) 
    393393{ 
    394394        $conn->capability = array(); 
     
    551551        $iil_errornum = 0; 
    552552 
    553         // set some imap options 
     553        // set options 
    554554        if (is_array($options)) { 
    555                 foreach($options as $optkey => $optval) { 
    556                         if ($optkey == 'auth_method') { 
    557                                 $auth_method = strtoupper($optval); 
    558                         } else if ($optkey == 'rootdir') { 
    559                                 $my_prefs['rootdir'] = $optval; 
    560                         } else if ($optkey == 'delimiter') { 
    561                                 $my_prefs['delimiter'] = $optval; 
    562                         } else if ($optkey == 'debug_mode') { 
    563                                 $my_prefs['debug_mode'] = $optval; 
    564                         } 
    565                 } 
    566         } 
    567  
    568         if (empty($auth_method)) 
     555        $my_prefs = $options; 
     556    } 
     557    // set auth method 
     558    if (!empty($my_prefs['auth_method'])) { 
     559            $auth_method = strtoupper($my_prefs['auth_method']); 
     560        } else { 
    569561                $auth_method = 'CHECK'; 
    570                  
     562    } 
     563 
    571564        $message = "INITIAL: $auth_method\n"; 
    572                  
     565 
    573566        $result = false; 
    574567         
     
    580573        $conn->user        = $user; 
    581574        $conn->host        = $host; 
    582          
     575 
    583576        if ($my_prefs['sort_field'] == 'INTERNALDATE') { 
    584577                $IMAP_USE_INTERNAL_DATE = true; 
     
    586579                $IMAP_USE_INTERNAL_DATE = false; 
    587580        } 
    588          
     581 
    589582        //check input 
    590583        if (empty($host)) { 
     
    661654                         
    662655                        // Now we're authenticated, capabilities need to be reread 
    663                         iil_ClearCapability(); 
     656                        iil_C_ClearCapability($conn); 
    664657                } 
    665658        } 
     
    706699 
    707700        if (is_resource($result)) { 
     701        if ($my_prefs['force_caps']) { 
     702                        iil_C_ClearCapability($conn); 
     703        } 
    708704                iil_C_Namespace($conn); 
    709705                return $conn; 
Note: See TracChangeset for help on using the changeset viewer.