preselect db if only one db
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-10-13 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* left.php: preselect db if only one db
|
||||
|
||||
2005-10-12 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* css/phpmyadmin.css.php, libraries/common.lib.php,
|
||||
themes/darkblue_orange/css/theme_right.css.php,
|
||||
|
18
left.php
18
left.php
@@ -14,15 +14,6 @@ require_once('./libraries/grab_globals.lib.php');
|
||||
// free the session file, for the other frames to be loaded
|
||||
session_write_close();
|
||||
|
||||
if (!empty($db)) {
|
||||
$db_start = $db;
|
||||
} else {
|
||||
$db_start = '';
|
||||
}
|
||||
|
||||
$db = isset( $db ) ? $db : '';
|
||||
$table = isset( $table ) ? $table : '';
|
||||
|
||||
/**
|
||||
* Gets a core script and starts output buffering work
|
||||
*/
|
||||
@@ -48,10 +39,19 @@ if ($server > 0) {
|
||||
// this function is defined in "common.lib.php"
|
||||
// it defines $num_dbs and $dblist
|
||||
PMA_availableDatabases();
|
||||
|
||||
if ( empty( $db ) && count( $dblist ) === 1 ) {
|
||||
reset( $dblist );
|
||||
$db = current( $dblist );
|
||||
}
|
||||
} else {
|
||||
$num_dbs = 0;
|
||||
}
|
||||
|
||||
$db = isset( $db ) ? $db : '';
|
||||
$table = isset( $table ) ? $table : '';
|
||||
$db_start = $db;
|
||||
|
||||
|
||||
// garvin: For re-usability, moved http-headers
|
||||
// to a seperate file. It can now be included by header.inc.php,
|
||||
|
Reference in New Issue
Block a user