Permalink
Browse files

Always flush in navigation because table_status can take long

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@849 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 0f29896 commit 4a014a6d696ff37f408d5bd7d24bd5321ced5534 jakubvrana committed Jul 16, 2009
Showing with 4 additions and 6 deletions.
  1. +2 −0 adminer/include/adminer.inc.php
  2. +1 −5 adminer/include/mysql.inc.php
  3. +1 −1 editor/include/adminer.inc.php
@@ -84,6 +84,8 @@ function adminer_message_query($query) {
function adminer_navigation($missing) {
global $SELF;
if (call_adminer('navigation', true, $missing) && $missing != "auth") {
+ ob_flush();
+ flush();
$databases = get_databases();
?>
<form action="" method="post">
@@ -201,14 +201,10 @@ function connect() {
return $dbh->error;
}
-function get_databases($flush = true) {
+function get_databases() {
// SHOW DATABASES can take a very long time so it is cached
$return = &$_SESSION["databases"][$_GET["server"]];
if (!isset($return)) {
- if ($flush) {
- ob_flush();
- flush();
- }
$return = get_vals("SHOW DATABASES");
}
return $return;
@@ -8,7 +8,7 @@ function adminer_credentials() {
}
function adminer_database() {
- $dbs = get_databases(false);
+ $dbs = get_databases();
return call_adminer('database', (count($dbs) == 1 ? $dbs[0] : (count($dbs) == 2 && information_schema($dbs[0]) ? $dbs[1] : 'test')));
}

0 comments on commit 4a014a6

Please sign in to comment.