Changeset 80fbdaa in github


Ignore:
Timestamp:
Aug 14, 2009 4:24:09 AM (4 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
4a941f7
Parents:
dc1dbc4
Message:

Changed imap_connect hook according to suggestions in #1485956

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap.php

    r2a34eb9 r80fbdaa  
    3737 * @package    Mail 
    3838 * @author     Thomas Bruederli <roundcube@gmail.com> 
    39  * @version    1.40 
     39 * @version    1.5 
    4040 * @link       http://ilohamail.org 
    4141 */ 
     
    108108                        'message' => 'Open SSL not available;'), TRUE, FALSE); 
    109109      $port = 143; 
    110   } 
     110    } 
    111111 
    112112    $ICL_PORT = $port; 
    113113    $IMAP_USE_INTERNAL_DATE = false; 
    114114     
    115     $data = rcmail::get_instance()->plugins->exec_hook('imap_connect', array('host' => $host, 'user' => $user)); 
    116     if (!empty($data['pass'])) 
    117       $pass = $data['pass']; 
    118  
    119     $this->conn = iil_Connect($data['host'], $data['user'], $pass, $this->options); 
     115    $attempt = 0; 
     116    do { 
     117      $data = rcmail::get_instance()->plugins->exec_hook('imap_connect', array('host' => $host, 'user' => $user, 'attempt' => ++$attempt)); 
     118      if (!empty($data['pass'])) 
     119        $pass = $data['pass']; 
     120 
     121      $this->conn = iil_Connect($data['host'], $data['user'], $pass, $this->options); 
     122    } while(!$this->conn && $data['retry']); 
     123 
    120124    $this->host = $data['host']; 
    121125    $this->user = $data['user']; 
Note: See TracChangeset for help on using the changeset viewer.