mirror of
https://github.com/vrana/adminer.git
synced 2026-07-07 17:23:02 +02:00
Pass credentials to connect()
This commit is contained in:
@@ -286,10 +286,10 @@ if (isset($_GET["elastic"])) {
|
||||
}
|
||||
}
|
||||
|
||||
function connect() {
|
||||
function connect($credentials) {
|
||||
$connection = new Db;
|
||||
|
||||
list($server, $username, $password) = adminer()->credentials();
|
||||
list($server, $username, $password) = $credentials;
|
||||
if (!preg_match('~^(https?://)?[-a-z\d.]+(:\d+)?$~', $server)) {
|
||||
return lang('Invalid server.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user