Ticket #1485172: use_imap_root_before_connect_v3.patch

File use_imap_root_before_connect_v3.patch, 1.0 kB (added by ziba, 4 months ago)

v2 is missing a semicolon

  • program/include/rcube_imap.php

    From 2a4be19d7be2a88dd64e8d93df8a2c6da1c3006e Mon Sep 17 00:00:00 2001
    From: Ziba Scott <ziba@umich.edu>
    Date: Tue, 5 Aug 2008 10:20:23 -0400
    Subject: [PATCH] IMAP root speedup
    
    ---
     program/include/rcube_imap.php |    8 ++++++++
     1 files changed, 8 insertions(+), 0 deletions(-)
    
    diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
    index f3714f4..bb92d37 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;