Elasticsearch: allow empty server name
This commit is contained in:
parent
e4d35f9591
commit
8a9df8ede1
|
@ -59,7 +59,7 @@ if (isset($_GET["elastic"])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function connect($server, $username, $password) {
|
function connect($server, $username, $password) {
|
||||||
preg_match('~^(https?://)?(.+)~', $server, $match);
|
preg_match('~^(https?://)?(.*)~', $server, $match);
|
||||||
$this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]/";
|
$this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]/";
|
||||||
$return = $this->query('');
|
$return = $this->query('');
|
||||||
if ($return) {
|
if ($return) {
|
||||||
|
|
Loading…
Reference in a new issue