Save bytes
This commit is contained in:
parent
3a36112a10
commit
ff45b8f7a9
|
@ -304,7 +304,7 @@ if (isset($_GET["pgsql"])) {
|
||||||
|
|
||||||
function tables_list() {
|
function tables_list() {
|
||||||
$query = "SELECT table_name, table_type FROM information_schema.tables WHERE table_schema = current_schema()";
|
$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 .= "
|
$query .= "
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT matviewname, 'MATERIALIZED VIEW'
|
SELECT matviewname, 'MATERIALIZED VIEW'
|
||||||
|
|
|
@ -1025,8 +1025,8 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '
|
||||||
: "<input name='db' value='" . h(DB) . "' autocapitalize='off'>\n"
|
: "<input name='db' value='" . h(DB) . "' autocapitalize='off'>\n"
|
||||||
);
|
);
|
||||||
echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\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";
|
echo "<br>" . lang('Schema') . ": <select name='ns'>" . optionlist(array("" => "") + $adminer->schemas(), $_GET["ns"]) . "</select>$db_events";
|
||||||
if ($_GET["ns"] != "") {
|
if ($_GET["ns"] != "") {
|
||||||
set_schema($_GET["ns"]);
|
set_schema($_GET["ns"]);
|
||||||
|
|
|
@ -89,14 +89,16 @@ if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (support("scheme") && DB != "" && $_GET["ns"] !== "") {
|
if (support("scheme")) {
|
||||||
if (!isset($_GET["ns"])) {
|
if (DB != "" && $_GET["ns"] !== "") {
|
||||||
redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema());
|
if (!isset($_GET["ns"])) {
|
||||||
}
|
redirect(preg_replace('~ns=[^&]*&~', '', ME) . "ns=" . get_schema());
|
||||||
if (!set_schema($_GET["ns"])) {
|
}
|
||||||
header("HTTP/1.1 404 Not Found");
|
if (!set_schema($_GET["ns"])) {
|
||||||
page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true);
|
header("HTTP/1.1 404 Not Found");
|
||||||
page_footer("ns");
|
page_header(lang('Schema') . ": " . h($_GET["ns"]), lang('Invalid schema.'), true);
|
||||||
exit;
|
page_footer("ns");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
if (support("kill") && $_POST && !$error) {
|
if (support("kill")) {
|
||||||
$killed = 0;
|
if ($_POST && !$error) {
|
||||||
foreach ((array) $_POST["kill"] as $val) {
|
$killed = 0;
|
||||||
if (kill_process($val)) {
|
foreach ((array) $_POST["kill"] as $val) {
|
||||||
$killed++;
|
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);
|
page_header(lang('Process list'), $error);
|
||||||
|
|
Loading…
Reference in a new issue