mirror of
https://github.com/vrana/adminer.git
synced 2025-08-22 14:12:51 +02:00
Remove unnecessary function
This commit is contained in:
@@ -1,6 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
function connect_error() {
|
if (isset($_GET["status"])) {
|
||||||
global $adminer, $connection, $token, $error, $drivers;
|
$_GET["variables"] = $_GET["status"];
|
||||||
|
}
|
||||||
|
if (isset($_GET["import"])) {
|
||||||
|
$_GET["sql"] = $_GET["import"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]) || $_GET["script"] == "connect" || $_GET["script"] == "kill")) {
|
||||||
|
if (DB != "" || $_GET["refresh"]) {
|
||||||
|
restart_session();
|
||||||
|
set_session("dbs", null);
|
||||||
|
}
|
||||||
if (DB != "") {
|
if (DB != "") {
|
||||||
header("HTTP/1.1 404 Not Found");
|
header("HTTP/1.1 404 Not Found");
|
||||||
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
|
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
|
||||||
@@ -71,21 +81,6 @@ function connect_error() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
page_footer("db");
|
page_footer("db");
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_GET["status"])) {
|
|
||||||
$_GET["variables"] = $_GET["status"];
|
|
||||||
}
|
|
||||||
if (isset($_GET["import"])) {
|
|
||||||
$_GET["sql"] = $_GET["import"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]) || $_GET["script"] == "connect" || $_GET["script"] == "kill")) {
|
|
||||||
if (DB != "" || $_GET["refresh"]) {
|
|
||||||
restart_session();
|
|
||||||
set_session("dbs", null);
|
|
||||||
}
|
|
||||||
connect_error(); // separate function to catch SQLite error
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user