Elasticsearch: allow empty server name

This commit is contained in:
Jakub Vrana 2017-02-20 18:07:30 +01:00
parent e4d35f9591
commit 8a9df8ede1

View file

@ -59,7 +59,7 @@ if (isset($_GET["elastic"])) {
}
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]/";
$return = $this->query('');
if ($return) {