Servers choice box was displayed even if there is only one server

This commit is contained in:
Loïc Chapeaux
2001-12-24 11:16:21 +00:00
parent e4b9fb85f1
commit 5432997e42
2 changed files with 57 additions and 39 deletions

View File

@@ -5,10 +5,14 @@ phpMyAdmin - Changelog
$Id$
$Source$
2001-12-24 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/auth/cookie.auth.lib.php3: servers choice box was displayed
even if there is only one server.
2001-12-23 Marc Delisle <lem9@users.sourceforge.net>
* links to new short doc pages are now completed
* updates to lang/italian.inc.php3, thanks to Pietro Danesi
* user_details.php3: missing message "Remember reload..."
* links to new short doc pages are now completed
* updates to lang/italian.inc.php3, thanks to Pietro Danesi
* user_details.php3: missing message "Remember reload..."
2001-12-23 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* tbl_select.php3, lines 202-206: fixed bug #472728 - Many fields / IE 5.5

View File

@@ -144,52 +144,66 @@ h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo
<input type="password" name="pma_password" value="" size="24" onfocus="this.select()" />
</td>
</tr>
<?php
if (count($cfgServers) > 1) {
echo "\n";
?>
<tr>
<td align="<?php echo $cell_align; ?>"><?php echo $GLOBALS['strServerChoice']; ?>&nbsp;:&nbsp;</td>
<td align="<?php echo $cell_align; ?>">
<select name="server">
<?php
echo "\n";
// Displays the MySQL servers choice
reset($cfgServers);
while (list($key, $val) = each($cfgServers)) {
if (!empty($val['host'])) {
echo ' <option value="' . $key . '"';
if (!empty($server) && ($server == $key)) {
echo ' selected="selected"';
}
echo '>';
if ($val['verbose'] != '') {
echo $val['verbose'];
} else {
echo $val['host'];
if (!empty($val['port'])) {
echo ':' . $val['port'];
<?php
echo "\n";
// Displays the MySQL servers choice
reset($cfgServers);
while (list($key, $val) = each($cfgServers)) {
if (!empty($val['host'])) {
echo ' <option value="' . $key . '"';
if (!empty($server) && ($server == $key)) {
echo ' selected="selected"';
}
// loic1: skip this because it's not a so good idea to
// display sockets used to everybody
// if (!empty($val['socket']) && PMA_PHP_INT_VERSION >= 30010) {
// echo ':' . $val['socket'];
// }
}
// loic1: if 'only_db' is an array and there is more than one
// value, displaying such informations may not be a so
// good idea
if (!empty($val['only_db'])) {
echo ' - ' . (is_array($val['only_db']) ? implode(', ', $val['only_db']) : $val['only_db']);
}
if (!empty($val['user']) && ($val['auth_type'] == 'basic')) {
echo ' (' . $val['user'] . ')';
}
echo '&nbsp;</option>' . "\n";
} // end if (!empty($val['host']))
} // end while
?>
echo '>';
if ($val['verbose'] != '') {
echo $val['verbose'];
} else {
echo $val['host'];
if (!empty($val['port'])) {
echo ':' . $val['port'];
}
// loic1: skip this because it's not a so good idea to
// display sockets used to everybody
// if (!empty($val['socket']) && PMA_PHP_INT_VERSION >= 30010) {
// echo ':' . $val['socket'];
// }
}
// loic1: if 'only_db' is an array and there is more than one
// value, displaying such informations may not be a so
// good idea
if (!empty($val['only_db'])) {
echo ' - ' . (is_array($val['only_db']) ? implode(', ', $val['only_db']) : $val['only_db']);
}
if (!empty($val['user']) && ($val['auth_type'] == 'basic')) {
echo ' (' . $val['user'] . ')';
}
echo '&nbsp;</option>' . "\n";
} // end if (!empty($val['host']))
} // end while
?>
</select>
</td>
</tr>
<?php
} // end if (server choice)
echo "\n";
?>
<tr>
<td colspan="2" align="center">
<?php
if (count($cfgServers) == 1) {
echo ' <input type="hidden" name="server" value="' . $server . '" />';
}
echo "\n";
?>
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="submit" value="<?php echo $GLOBALS['strLogin']; ?>" />
</td>