mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 11:04:02 +02:00
Extensible list of databases
This commit is contained in:
@@ -19,13 +19,17 @@ class Adminer {
|
||||
|
||||
function database() {
|
||||
global $connection;
|
||||
$databases = get_databases(false);
|
||||
$databases = $this->databases(false);
|
||||
return (!$databases
|
||||
? $connection->result("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', 1)") // username without the database list
|
||||
: $databases[(information_schema($databases[0]) ? 1 : 0)] // first available database
|
||||
);
|
||||
}
|
||||
|
||||
function databases($flush = true) {
|
||||
return get_databases($flush);
|
||||
}
|
||||
|
||||
function headers() {
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user