diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-27 08:11:17 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-27 08:11:17 +0000 |
| commit | ca4d027a2f3451d1907ff9ca0645bef06641bb3e (patch) | |
| tree | a0f04e8c587517497a3db68c7adebc71d3f47fa4 /roundcubemail/installer/config.php | |
| parent | 2a29c0de621e53c9cd9af3c8f72d3fe618de15a8 (diff) | |
Allow to skip the config step if config files already exist
git-svn-id: https://svn.roundcube.net/trunk@1144 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/installer/config.php')
| -rw-r--r-- | roundcubemail/installer/config.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/roundcubemail/installer/config.php b/roundcubemail/installer/config.php index c110276aa..2719cdb87 100644 --- a/roundcubemail/installer/config.php +++ b/roundcubemail/installer/config.php @@ -5,7 +5,7 @@ ini_set('display_errors', 1); require_once 'include/rcube_html.inc'; -$RCI->load_config(); +// also load the default config to fill in the fields $RCI->load_defaults(); if (!empty($_POST['submit'])) { @@ -235,12 +235,16 @@ echo $select_dbba->show($RCI->getprop('db_backend')); <div id="defaulthostlist"> <?php -$default_hosts = array_unique((array)$RCI->getprop('default_host')); +$default_hosts = (array)$RCI->getprop('default_host'); $text_imaphost = new textfield(array('name' => '_default_host[]', 'size' => 30)); -for ($i=0; $i < count($default_hosts); $i++) { - echo '<div id="defaulthostentry'.$i.'">' . $text_imaphost->show($default_hosts[$i]); - if ($i > 0) +$i = 0; +foreach ($default_hosts as $key => $name) { + if (empty($name)) + continue; + $host = is_numeric($key) ? $name : $key; + echo '<div id="defaulthostentry'.$i.'">' . $text_imaphost->show($host); + if ($i++ > 0) echo '<a href="#" onclick="removehostfield(this.parentNode);return false" class="removelink" title="Remove this entry">remove</a>'; echo '</div>'; } @@ -249,7 +253,7 @@ for ($i=0; $i < count($default_hosts); $i++) { </div> <div><a href="javascript:addhostfield()" class="addlink" title="Add another field">add</a></div> -<p class="hint">Leave blank to show a textbox at login</p> +<p class="hint">Leave blank to show a textbox at login. To use SSL/IMAPS connection, type ssl://hostname</p> </dd> <dt class="propname">default_port</dt> @@ -431,7 +435,7 @@ echo $input_locale->show($RCI->getprop('locale_string')); <?php -echo '<p><input type="submit" name="submit" value="UPDATE" ' . ($RCI->failures ? 'disabled' : '') . ' /></p>'; +echo '<p><input type="submit" name="submit" value="' . ($RCI->configured ? 'UPDATE' : 'CREATE') . ' CONFIG" ' . ($RCI->failures ? 'disabled' : '') . ' /></p>'; ?> </form> |
