Changeset 1573 in subversion
- Timestamp:
- Jun 24, 2008 9:36:19 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/include/rcmail.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcmail.php
r1572 r1573 475 475 { 476 476 $default_host = $this->config->get('default_host'); 477 $host = empty($default_host) ? get_input_value('_host', RCUBE_INPUT_POST) : $default_host; 478 479 if (is_array($host)) { 477 $host = null; 478 479 if (is_array($default_host)) { 480 $post_host = get_input_value('_host', RCUBE_INPUT_POST); 481 482 // direct match in default_host array 483 if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) { 484 $host = $post_host; 485 } 486 487 // try to select host by mail domain 480 488 list($user, $domain) = explode('@', get_input_value('_user', RCUBE_INPUT_POST)); 481 489 if (!empty($domain)) { 482 foreach ($ host as $imap_host => $mail_domains) {490 foreach ($default_host as $imap_host => $mail_domains) { 483 491 if (is_array($mail_domains) && in_array($domain, $mail_domains)) { 484 492 $host = $imap_host; … … 489 497 490 498 // take the first entry if $host is still an array 491 if (is_array($host)) 492 $host = array_shift($host); 499 if (empty($host)) { 500 $host = array_shift($default_host); 501 } 502 } 503 else if (empty($default_host)) { 504 $host = get_input_value('_host', RCUBE_INPUT_POST); 493 505 } 494 506
Note: See TracChangeset
for help on using the changeset viewer.
