mirror of
https://github.com/vrana/adminer.git
synced 2026-04-14 16:38:15 +02:00
Pass credentials to connect()
This commit is contained in:
@@ -251,9 +251,8 @@ if (isset($_GET["simpledb"])) {
|
||||
|
||||
|
||||
|
||||
function connect() {
|
||||
$adminer = adminer();
|
||||
list($host, , $password) = $adminer->credentials();
|
||||
function connect($credentials) {
|
||||
list($host, , $password) = $credentials;
|
||||
if (!preg_match('~^(https?://)?[-a-z\d.]+(:\d+)?$~', $host)) {
|
||||
return lang('Invalid server.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user