Changeset 2143 in subversion
- Timestamp:
- Dec 11, 2008 3:30:00 AM (4 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 5 edited
-
CHANGELOG (modified) (1 diff)
-
UPGRADING (modified) (1 diff)
-
config/main.inc.php.dist (modified) (2 diffs)
-
program/include/rcmail.php (modified) (1 diff)
-
program/lib/imap.inc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r2132 r2143 1 1 CHANGELOG RoundCube Webmail 2 2 --------------------------- 3 4 2008/12/11 (alec) 5 ---------- 6 - Performance: allow setting imap rootdir and delimiter before connect (#1485172) 3 7 4 8 2008/12/06 (alec) -
trunk/roundcubemail/UPGRADING
r2024 r2143 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 is IMAP root directory, set imap_root option to NULL 21 22 3. Let the update script/installer check your configuration and 22 23 update your config files as suggested by the updater. -
trunk/roundcubemail/config/main.inc.php.dist
r2115 r2143 62 62 $rcmail_config['imap_auth_type'] = null; 63 63 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. 67 $rcmail_config['imap_root'] = null; 68 $rcmail_config['imap_delimiter'] = null; 69 64 70 // Automatically add this domain to user names for login 65 71 // Only for IMAP servers that require full e-mail addresses for login … … 152 158 // use this name to compose page titles 153 159 $rcmail_config['product_name'] = 'RoundCube Webmail'; 154 155 // only list folders within this path156 $rcmail_config['imap_root'] = '';157 160 158 161 // store draft message is this mailbox -
trunk/roundcubemail/program/include/rcmail.php
r2060 r2143 516 516 $this->imap->set_charset($this->config->get('default_charset', RCMAIL_CHARSET)); 517 517 518 // set root dir from config519 if ($imap_root = $this->config->get('imap_root')) {520 $this->imap->set_rootdir($imap_root);521 }522 518 if ($default_folders = $this->config->get('default_imap_folders')) { 523 519 $this->imap->set_default_mailboxes($default_folders); -
trunk/roundcubemail/program/lib/imap.inc
r2096 r2143 74 74 - allow iil_C_HandlePartBody() to fetch whole message 75 75 - optimize iil_C_FetchHeaders() to use only one FETCH command 76 - added 4th argument to iil_Connect() 77 - allow setting rootdir and delimiter before connect 76 78 77 79 ********************************************************/ … … 197 199 198 200 function iil_PutLine($fp, $string, $endln=true) { 199 //console('C: '. rtrim($string));201 console('C: '. rtrim($string)); 200 202 return fputs($fp, $string . ($endln ? "\r\n" : '')); 201 203 } … … 477 479 function iil_C_NameSpace(&$conn) { 478 480 global $my_prefs; 481 482 if (isset($my_prefs['rootdir']) && is_string($my_prefs['rootdir'])) { 483 $conn->rootdir = $my_prefs['rootdir']; 484 return true; 485 } 479 486 480 487 if (!iil_C_GetCapability($conn, 'NAMESPACE')) { 481 488 return false; 482 }483 484 if ($my_prefs["rootdir"]) {485 return true;486 489 } 487 490 … … 511 514 $conn->rootdir = $first_userspace[0]; 512 515 $conn->delimiter = $first_userspace[1]; 513 $my_prefs["rootdir"] = substr($conn->rootdir, 0, -1); 516 $my_prefs['rootdir'] = substr($conn->rootdir, 0, -1); 517 $my_prefs['delimiter'] = $conn->delimiter; 514 518 515 519 return true; 516 520 } 517 521 518 function iil_Connect($host, $user, $password ) {522 function iil_Connect($host, $user, $password, $options=null) { 519 523 global $iil_error, $iil_errornum; 520 524 global $ICL_SSL, $ICL_PORT; … … 524 528 $iil_error = ''; 525 529 $iil_errornum = 0; 526 527 //set auth method 528 $auth_method = 'plain'; 529 if (func_num_args() >= 4) { 530 $auth_array = func_get_arg(3); 531 if (is_array($auth_array)) { 532 $auth_method = $auth_array['imap']; 533 } 534 if (empty($auth_method)) { 535 $auth_method = "plain"; 536 } 537 } 530 531 // set some imap options 532 if (is_array($options)) { 533 foreach($options as $optkey => $optval) { 534 if ($optkey == 'imap') { 535 $auth_method = $optval; 536 } else if ($optkey == 'rootdir') { 537 $my_prefs['rootdir'] = $optval; 538 } else if ($optkey == 'delimiter') { 539 $my_prefs['delimiter'] = $optval; 540 } 541 } 542 } 543 544 if (empty($auth_method)) 545 $auth_method = 'plain'; 546 538 547 $message = "INITIAL: $auth_method\n"; 539 548 … … 2139 2148 */ 2140 2149 function iil_C_GetHierarchyDelimiter(&$conn) { 2150 2151 global $my_prefs; 2152 2141 2153 if ($conn->delimiter) { 2142 return $conn->delimiter; 2154 return $conn->delimiter; 2155 } 2156 if (!empty($my_prefs['delimiter'])) { 2157 return ($conn->delimiter = $my_prefs['delimiter']); 2143 2158 } 2144 2159
Note: See TracChangeset
for help on using the changeset viewer.
