Show server selection if no server set and we have one server configuration (bug #1399880).
This commit is contained in:
@@ -7,6 +7,9 @@ $Source$
|
|||||||
|
|
||||||
2006-01-11 Michal Čihař <michal@cihar.com>
|
2006-01-11 Michal Čihař <michal@cihar.com>
|
||||||
* main.php: Do not fail if no server is defined.
|
* main.php: Do not fail if no server is defined.
|
||||||
|
* main.php, libraries/left_header.inc.php,
|
||||||
|
libraries/select_server.lib.php: Show server selection if no server set
|
||||||
|
and we have one server configuration (bug #1399880).
|
||||||
|
|
||||||
2006-01-10 Marc Delisle <lem9@users.sourceforge.net>
|
2006-01-10 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/sqlparser.lib.php: bug #1394479, problem detecting ending
|
* libraries/sqlparser.lib.php: bug #1394479, problem detecting ending
|
||||||
|
@@ -83,7 +83,7 @@ echo '</div>' . "\n";
|
|||||||
/**
|
/**
|
||||||
* Displays the MySQL servers choice form
|
* Displays the MySQL servers choice form
|
||||||
*/
|
*/
|
||||||
if ( $GLOBALS['cfg']['LeftDisplayServers'] && count($cfg['Servers']) > 1 ) {
|
if ($GLOBALS['cfg']['LeftDisplayServers'] && (count($GLOBALS['cfg']['Servers']) > 1 || $server == 0 && count($GLOBALS['cfg']['Servers']) == 1)) {
|
||||||
include('./libraries/select_server.lib.php');
|
include('./libraries/select_server.lib.php');
|
||||||
PMA_select_server(TRUE, TRUE);
|
PMA_select_server(TRUE, TRUE);
|
||||||
} // end if LeftDisplayServers
|
} // end if LeftDisplayServers
|
||||||
|
@@ -72,9 +72,18 @@ function PMA_select_server($form, $left) {
|
|||||||
</select>
|
</select>
|
||||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||||
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
|
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
|
||||||
<noscript>
|
<?php
|
||||||
|
// Show submit button if we have just one server (this happens with no default)
|
||||||
|
if (count($cfg['Servers']) > 1) {
|
||||||
|
echo '<noscript>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
<input type="submit" value="<?php echo $GLOBALS['strGo']; ?>" />
|
<input type="submit" value="<?php echo $GLOBALS['strGo']; ?>" />
|
||||||
</noscript>
|
<?php
|
||||||
|
if (count($cfg['Servers']) > 1) {
|
||||||
|
echo '</noscript>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
22
main.php
22
main.php
@@ -47,11 +47,12 @@ if ( $server > 0 ) {
|
|||||||
if ($cfg['Server']['auth_type'] == 'config') {
|
if ($cfg['Server']['auth_type'] == 'config') {
|
||||||
$cfg['ShowChgPassword'] = FALSE;
|
$cfg['ShowChgPassword'] = FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="mysqlmaininformation">
|
<div id="mysqlmaininformation">
|
||||||
<?php
|
<?php
|
||||||
|
if ( $server > 0 ) {
|
||||||
// robbat2: Use the verbose name of the server instead of the hostname
|
// robbat2: Use the verbose name of the server instead of the hostname
|
||||||
// if a value is set
|
// if a value is set
|
||||||
$server_info = '';
|
$server_info = '';
|
||||||
@@ -73,15 +74,20 @@ if ( $server > 0 ) {
|
|||||||
|
|
||||||
echo '<h1 xml:lang="en" dir="ltr">MySQL - ' . PMA_MYSQL_STR_VERSION
|
echo '<h1 xml:lang="en" dir="ltr">MySQL - ' . PMA_MYSQL_STR_VERSION
|
||||||
.'</h1>' . "\n";
|
.'</h1>' . "\n";
|
||||||
|
} else {
|
||||||
|
// Case when no server selected
|
||||||
|
echo '<h1 xml:lang="en" dir="ltr">MySQL</h1>' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the MySQL servers choice form
|
* Displays the MySQL servers choice form
|
||||||
*/
|
*/
|
||||||
if (!$cfg['LeftDisplayServers'] && count($cfg['Servers']) > 1) {
|
if (!$cfg['LeftDisplayServers'] && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1)) {
|
||||||
include('./libraries/select_server.lib.php');
|
include('./libraries/select_server.lib.php');
|
||||||
PMA_select_server(TRUE, FALSE);
|
PMA_select_server(TRUE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $server > 0 ) {
|
||||||
echo '<ul>' . "\n";
|
echo '<ul>' . "\n";
|
||||||
|
|
||||||
PMA_printListItem( $strProtocolVersion . ': ' . PMA_DBI_get_proto_info()
|
PMA_printListItem( $strProtocolVersion . ': ' . PMA_DBI_get_proto_info()
|
||||||
|
Reference in New Issue
Block a user