mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
Don't flush before sending headers
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@845 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -201,12 +201,14 @@ function connect() {
|
|||||||
return $dbh->error;
|
return $dbh->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_databases() {
|
function get_databases($flush = true) {
|
||||||
// SHOW DATABASES can take very long so it is cached
|
// SHOW DATABASES can take a very long time so it is cached
|
||||||
$return = &$_SESSION["databases"][$_GET["server"]];
|
$return = &$_SESSION["databases"][$_GET["server"]];
|
||||||
if (!isset($return)) {
|
if (!isset($return)) {
|
||||||
ob_flush();
|
if ($flush) {
|
||||||
flush();
|
ob_flush();
|
||||||
|
flush();
|
||||||
|
}
|
||||||
$return = get_vals("SHOW DATABASES");
|
$return = get_vals("SHOW DATABASES");
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
@@ -8,7 +8,7 @@ function adminer_credentials() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function adminer_database() {
|
function adminer_database() {
|
||||||
$dbs = get_databases();
|
$dbs = get_databases(false);
|
||||||
return call_adminer('database', (count($dbs) == 1 ? $dbs[0] : (count($dbs) == 2 && information_schema($dbs[0]) ? $dbs[1] : 'test')));
|
return call_adminer('database', (count($dbs) == 1 ? $dbs[0] : (count($dbs) == 2 && information_schema($dbs[0]) ? $dbs[1] : 'test')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user