Ticket #1485172: use_imap_root_before_connect_v2.patch

File use_imap_root_before_connect_v2.patch, 0.7 kB (added by maharaja, 4 months ago)

updated patch

  • program/include/rcube_imap.php

    diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
    index b17e93e..c14e191 100644
    a b  
    119119    $ICL_PORT = $port; 
    120120    $IMAP_USE_INTERNAL_DATE = false; 
    121121 
     122    // Setting rootdir before iil_Connect can save time detecting the namespace 
     123    $imap_root = rcmail::get_instance()->config->get('imap_root') 
     124    if ($imap_root) { 
     125        // Iloha looks for a global variable $my_prefs 
     126        global $my_prefs; 
     127        $my_prefs["rootdir"] = $imap_root;  
     128    } 
     129 
    122130    $this->conn = iil_Connect($host, $user, $pass, array('imap' => $auth_type ? $auth_type : 'check')); 
    123131    $this->host = $host; 
    124132    $this->user = $user;