function tables_list() {
$query = "SELECT table_name, table_type FROM information_schema.tables WHERE table_schema = current_schema()";
- if (support('materializedview')) {
+ if (support('materializedview')) { // ' - support("materializedview") could be removed by compile.php
$query .= "
UNION ALL
SELECT matviewname, 'MATERIALIZED VIEW'
: "<input name='db' value='" . h(DB) . "' autocapitalize='off'>\n"
);
echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\n";
- if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
- if (support("scheme")) {
+ if (support("scheme")) {
+ if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
echo "<br>" . lang('Schema') . ": <select name='ns'>" . optionlist(array("" => "") + $adminer->schemas(), $_GET["ns"]) . "</select>$db_events";
if ($_GET["ns"] != "") {
set_schema($_GET["ns"]);
exit;
}
-if (support("scheme") && DB != "" && $_GET["ns"] !== "") {
- if (!isset($_GET["ns"])) {
- redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema());
- }
- if (!set_schema($_GET["ns"])) {
- header("HTTP/1.1 404 Not Found");
- page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true);
- page_footer("ns");
- exit;
+if (support("scheme")) {
+ if (DB != "" && $_GET["ns"] !== "") {
+ if (!isset($_GET["ns"])) {
+ redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema());
+ }
+ if (!set_schema($_GET["ns"])) {
+ header("HTTP/1.1 404 Not Found");
+ page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true);
+ page_footer("ns");
+ exit;
+ }
}
}
<?php
-if (support("kill") && $_POST && !$error) {
- $killed = 0;
- foreach ((array) $_POST["kill"] as $val) {
- if (kill_process($val)) {
- $killed++;
+if (support("kill")) {
+ if ($_POST && !$error) {
+ $killed = 0;
+ foreach ((array) $_POST["kill"] as $val) {
+ if (kill_process($val)) {
+ $killed++;
+ }
}
+ queries_redirect(ME . "processlist=", lang('%d process(es) have been killed.', $killed), $killed || !$_POST["kill"]);
}
- queries_redirect(ME . "processlist=", lang('%d process(es) have been killed.', $killed), $killed || !$_POST["kill"]);
}
page_header(lang('Process list'), $error);