diff --git a/default.css b/default.css
index 01c8e6df..6c5a2fda 100644
--- a/default.css
+++ b/default.css
@@ -14,6 +14,7 @@ p { margin: 0 20px 1em 0; }
img { vertical-align: middle; }
code { background-color: #eee; }
.js .hidden { display: none; }
+.nowrap { white-space: nowrap; }
.error { color: red; background: #fee; padding: .5em .8em; }
.message { color: green; background: #efe; padding: .5em .8em; }
.char { color: #007F00; }
diff --git a/design.inc.php b/design.inc.php
index b73784fc..433d36a5 100644
--- a/design.inc.php
+++ b/design.inc.php
@@ -78,11 +78,7 @@ function page_footer($missing = false) {
" />
diff --git a/dump.inc.php b/dump.inc.php
index ff4e4e00..bad01177 100644
--- a/dump.inc.php
+++ b/dump.inc.php
@@ -151,10 +151,7 @@ foreach (array('', 'USE', 'DROP, CREATE', 'CREATE', 'CREATE, ALTER') as $val) {
echo "
" . ($val ? $val : lang('skip')) . " | ";
}
echo "\n";
-if (!strlen($_GET["db"]) && !isset($_SESSION["databases"][$_GET["server"]])) {
- $_SESSION["databases"][$_GET["server"]] = get_vals("SHOW DATABASES");
-}
-foreach ((strlen($_GET["db"]) ? array($_GET["db"]) : $_SESSION["databases"][$_GET["server"]]) as $db) {
+foreach ((strlen($_GET["db"]) ? array($_GET["db"]) : get_databases()) as $db) {
if ($db != "information_schema" || $mysql->server_info < 5) {
echo "" . htmlspecialchars($db) . " | ";
foreach (array('', 'USE', 'DROP, CREATE', 'CREATE', 'CREATE, ALTER') as $val) {
diff --git a/editing.inc.php b/editing.inc.php
index 34693169..265e64b6 100644
--- a/editing.inc.php
+++ b/editing.inc.php
@@ -111,7 +111,7 @@ function edit_fields($fields, $collations, $type = "TABLE") {
checked="checked" /> |
" maxlength="255" /> |
-
+ |
diff --git a/functions.inc.php b/functions.inc.php
index de714cd8..a30a7546 100644
--- a/functions.inc.php
+++ b/functions.inc.php
@@ -40,6 +40,15 @@ function get_vals($query) {
return $return;
}
+function get_databases() {
+ $return = &$_SESSION["databases"][$_GET["server"]];
+ if (!isset($return)) {
+ flush();
+ $return = get_vals("SHOW DATABASES");
+ }
+ return $return;
+}
+
function table_status($table) {
global $mysql;
$result = $mysql->query("SHOW TABLE STATUS LIKE '" . $mysql->escape_string(addcslashes($table, "%_")) . "'");
diff --git a/index.php b/index.php
index 84cbb379..d957900a 100644
--- a/index.php
+++ b/index.php
@@ -129,6 +129,13 @@ if (isset($_GET["download"])) {
}
}
$message = lang('Tables have been truncated.');
+ } elseif (isset($_POST["move"])) {
+ $rename = array();
+ foreach ($_POST["tables"] as $table) {
+ $rename[] = idf_escape($table) . " TO " . idf_escape($_POST["target"]) . "." . idf_escape($table);
+ }
+ $result = queries("RENAME TABLE " . implode(", ", $rename));
+ $message = lang('Tables have been moved.');
} elseif ($result = queries((isset($_POST["optimize"]) ? "OPTIMIZE" : (isset($_POST["check"]) ? "CHECK" : (isset($_POST["repair"]) ? "REPAIR" : (isset($_POST["drop"]) ? "DROP" : "ANALYZE")))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"])))) {
while ($row = $result->fetch_assoc()) {
$message .= htmlspecialchars("$row[Table]: $row[Msg_text]") . " ";
@@ -148,12 +155,23 @@ if (isset($_GET["download"])) {
} else {
echo "\n";
}
$result->free();
diff --git a/select.inc.php b/select.inc.php
index bfa41304..c38a46d4 100644
--- a/select.inc.php
+++ b/select.inc.php
@@ -236,7 +236,7 @@ for (var i=0; > i; i++) {
echo " |
\n";
}
$unique_idf = implode('&', unique_idf($row, $indexes));
- echo '' . (count($select) == count($group) ? ' ' . lang('edit') . ' | ' : '');
+ echo '
' . (count($select) == count($group) ? ' ' . lang('edit') . ' | ' : '');
foreach ($row as $key => $val) {
if (!isset($val)) {
$val = "NULL";