diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-28 22:59:02 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-28 22:59:02 +0000 |
| commit | dcf21363a62c8f661e5e67baa0c6ffbed02cf263 (patch) | |
| tree | 3b30d874f439dd7e0f1b6a1ba57418154a9f414b /roundcubemail/installer/test.php | |
| parent | 9cf8668eb789a66539ee470aafb52d1b7740ba2e (diff) | |
Fix imap host selection in install script
git-svn-id: https://svn.roundcube.net/trunk@1158 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/installer/test.php')
| -rw-r--r-- | roundcubemail/installer/test.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/roundcubemail/installer/test.php b/roundcubemail/installer/test.php index 62535ac33..d83534bb3 100644 --- a/roundcubemail/installer/test.php +++ b/roundcubemail/installer/test.php @@ -238,9 +238,14 @@ echo '</p>'; <?php -$default_hosts = (array)$RCI->getprop('default_host'); -$select_imaphost = new select(array('name' => '_host', 'id' => 'imaphost')); -$select_imaphost->add(array_values($default_hosts)); +$default_hosts = $RCI->get_hostlist(); +if (!empty($default_hosts)) { + $host_field = new select(array('name' => '_host', 'id' => 'imaphost')); + $host_field->add($default_hosts); +} +else { + $host_field = new textfield(array('name' => '_host', 'id' => 'imaphost')); +} $user_field = new textfield(array('name' => '_user', 'id' => 'imapuser')); $pass_field = new passwordfield(array('name' => '_pass', 'id' => 'imappass')); @@ -251,7 +256,7 @@ $pass_field = new passwordfield(array('name' => '_pass', 'id' => 'imappass')); <tbody> <tr> <td><label for="imaphost">Server</label></td> - <td><?php echo $select_imaphost->show($_POST['_host'] ? $_POST['_host'] : '0'); ?></td> + <td><?php echo $host_field->show($_POST['_host']); ?></td> </tr> <tr> <td>Port</td> |
