Ticket #1485172: use_imap_root_before_connect.patch

File use_imap_root_before_connect.patch, 0.7 kB (added by ziba, 5 months ago)
  • 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    if ($imap_root = rcmail::get_instance()->config->get('imap_root')) { 
     124        // Iloha looks for a global variable $my_prefs 
     125        global $my_prefs; 
     126        $my_prefs["rootdir"] = $imap_root;  
     127    } 
     128 
    122129    $this->conn = iil_Connect($host, $user, $pass, array('imap' => $auth_type ? $auth_type : 'check')); 
    123130    $this->host = $host; 
    124131    $this->user = $user;