mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
IMAP: Avoid globals
This commit is contained in:
@@ -205,18 +205,16 @@ if (isset($_GET["imap"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tables_list() {
|
function tables_list() {
|
||||||
global $connection;
|
return connection()->tables_list();
|
||||||
return $connection->tables_list();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function table_status($name = "", $fast = false) {
|
function table_status($name = "", $fast = false) {
|
||||||
global $connection;
|
|
||||||
if ($name != "") {
|
if ($name != "") {
|
||||||
return $connection->table_status($name, $fast);
|
return connection()->table_status($name, $fast);
|
||||||
}
|
}
|
||||||
$return = array();
|
$return = array();
|
||||||
foreach (tables_list() as $table => $type) {
|
foreach (tables_list() as $table => $type) {
|
||||||
$return[$table] = $connection->table_status($table, $fast);
|
$return[$table] = connection()->table_status($table, $fast);
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
@@ -226,8 +224,7 @@ if (isset($_GET["imap"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function error() {
|
function error() {
|
||||||
global $connection;
|
return h(connection()->error);
|
||||||
return h($connection->error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function is_view($table_status) {
|
function is_view($table_status) {
|
||||||
|
Reference in New Issue
Block a user