From 49f7886f41d9780b54da439c999cfeaa5ec5ae3e Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Tue, 30 Sep 2008 12:00:18 +0000 Subject: [PATCH] SHOW DATABASES can be revoked git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@506 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- design.inc.php | 12 +++++++----- functions.inc.php | 10 ++++++---- index.php | 3 ++- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/design.inc.php b/design.inc.php index 7518b175..821e597e 100644 --- a/design.inc.php +++ b/design.inc.php @@ -76,16 +76,18 @@ function page_footer($missing = false) {

" /> - + + + +" /> +

+ +
query($query); $return = array(); - while ($row = $result->fetch_row()) { - $return[] = $row[0]; + $result = $mysql->query($query); + if ($result) { + while ($row = $result->fetch_row()) { + $return[] = $row[0]; + } + $result->free(); } - $result->free(); return $return; } diff --git a/index.php b/index.php index 49d385d4..aa7a1798 100644 --- a/index.php +++ b/index.php @@ -166,7 +166,8 @@ if (isset($_GET["download"])) { } echo "\n"; echo "

\n"; - echo "

" . lang('Move to other database') . ":

\n"; + $db = (isset($_POST["target"]) ? $_POST["target"] : $_GET["db"]); + echo "

" . lang('Move to other database') . (get_databases() ? ": " : ': ') . "

\n"; echo "\n"; } $result->free();