Changeset 230f944 in github
- Timestamp:
- Dec 24, 2008 9:29:47 AM (4 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 922c2d9
- Parents:
- 1608f43
- Files:
-
- 4 edited
-
UPGRADING (modified) (1 diff)
-
config/main.inc.php.dist (modified) (1 diff)
-
program/include/rcmail.php (modified) (4 diffs)
-
program/include/rcube_imap.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
UPGRADING
r574a9a9 r230f944 19 19 the latter one, you have to temporary set 'enable_installer' to true 20 20 in your local config/main.inc.php file. 21 WARNING: If you don't know what an "IMAP root directory" is,22 set the imap_root option to NULL23 21 3. Let the update script/installer check your configuration and 24 22 update your config files as suggested by the updater. -
config/main.inc.php.dist
r58687d0 r230f944 63 63 64 64 // If you know your imap's root directory and its folder delimiter, 65 // you can specify them here. Otherwise they will be determined 66 // during every imap connection. 65 // you can specify them here. Otherwise they will be determined automatically. 67 66 $rcmail_config['imap_root'] = null; 68 67 $rcmail_config['imap_delimiter'] = null; -
program/include/rcmail.php
r030c848 r230f944 353 353 // set pagesize from config 354 354 $this->imap->set_pagesize($this->config->get('pagesize', 50)); 355 356 // Setting root and delimiter before iil_Connect can save time detecting them 357 // using NAMESPACE and LIST 358 $options = array( 359 'imap' => $this->config->get('imap_auth_type', 'check'), 360 'delimiter' => isset($_SESSION['imap_delimiter']) ? $_SESSION['imap_delimiter'] : $this->config->get('imap_delimiter'), 361 ); 362 363 if (isset($_SESSION['imap_root'])) 364 $options['rootdir'] = $_SESSION['imap_root']; 365 else if ($imap_root = $this->config->get('imap_root')) 366 $options['rootdir'] = $imap_root; 367 368 $this->imap->set_options($options); 355 369 356 370 // set global object for backward compatibility … … 372 386 373 387 if ($_SESSION['imap_host'] && !$this->imap->conn) { 374 if (!($conn = $this->imap->connect($_SESSION['imap_host'], $_SESSION['username'], $this->decrypt_passwd($_SESSION['password']), $_SESSION['imap_port'], $_SESSION['imap_ssl'] , rcmail::get_instance()->config->get('imap_auth_type', 'check')))) {388 if (!($conn = $this->imap->connect($_SESSION['imap_host'], $_SESSION['username'], $this->decrypt_passwd($_SESSION['password']), $_SESSION['imap_port'], $_SESSION['imap_ssl']))) { 375 389 if ($this->output) 376 390 $this->output->show_message($this->imap->error_code == -1 ? 'imaperror' : 'sessionerror', 'error'); … … 453 467 454 468 // exit if IMAP login failed 455 if (!($imap_login = $this->imap->connect($host, $username, $pass, $imap_port, $imap_ssl , $config['imap_auth_type'])))469 if (!($imap_login = $this->imap->connect($host, $username, $pass, $imap_port, $imap_ssl))) 456 470 return false; 457 471 … … 525 539 $this->imap->set_page($_SESSION['page']); 526 540 } 541 542 // cache IMAP root and delimiter in session for performance reasons 543 $_SESSION['imap_root'] = $this->imap->root_dir; 544 $_SESSION['imap_delimiter'] = $this->imap->delimiter; 527 545 } 528 546 -
program/include/rcube_imap.php
r2b5c123 r230f944 67 67 var $debug_level = 1; 68 68 var $error_code = 0; 69 var $options = array('imap' => 'check'); 69 70 70 71 … … 91 92 * @access public 92 93 */ 93 function connect($host, $user, $pass, $port=143, $use_ssl=null , $auth_type=null)94 function connect($host, $user, $pass, $port=143, $use_ssl=null) 94 95 { 95 96 global $ICL_SSL, $ICL_PORT, $IMAP_USE_INTERNAL_DATE; … … 108 109 $IMAP_USE_INTERNAL_DATE = false; 109 110 110 // set connection options 111 $options['imap'] = $auth_type ? $auth_type : 'check'; 112 113 // Setting root and delimiter before iil_Connect can save time detecting them 114 // using NAMESPACE and LIST 115 if (is_string($imap_root = rcmail::get_instance()->config->get('imap_root'))) 116 $options['rootdir'] = $imap_root; 117 if($imap_delimiter = rcmail::get_instance()->config->get('imap_delimiter')) 118 $options['delimiter'] = $imap_delimiter; 119 120 $this->conn = iil_Connect($host, $user, $pass, $options); 111 $this->conn = iil_Connect($host, $user, $pass, $this->options); 121 112 $this->host = $host; 122 113 $this->user = $user; … … 183 174 } 184 175 176 /** 177 * Set options to be used in iil_Connect() 178 */ 179 function set_options($opt) 180 { 181 $this->options = array_merge((array)$opt, $this->options); 182 } 185 183 186 184 /** … … 199 197 200 198 $this->root_dir = $root; 199 $this->options['rootdir'] = $root; 201 200 202 201 if (empty($this->delimiter))
Note: See TracChangeset
for help on using the changeset viewer.
