Merge pull request #5119 from MrPetovan/task/5116-remove-dns-get-record-from-dba

Remove obsolete DNS test from include/dba
This commit is contained in:
Tobias Diekershoff 2018-05-24 07:53:25 +02:00 committed by GitHub
commit e814e805c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,16 +52,6 @@ class dba {
return false; return false;
} }
if ($a->mode == App::MODE_INSTALL) {
// server has to be a non-empty string that is not 'localhost' and not an IP
if (strlen($server) && ($server !== 'localhost') && filter_var($server, FILTER_VALIDATE_IP) === false) {
if (! dns_get_record($server, DNS_A + DNS_CNAME)) {
self::$error = L10n::t('Cannot locate DNS info for database server \'%s\'', $server);
return false;
}
}
}
if (class_exists('\PDO') && in_array('mysql', PDO::getAvailableDrivers())) { if (class_exists('\PDO') && in_array('mysql', PDO::getAvailableDrivers())) {
self::$driver = 'pdo'; self::$driver = 'pdo';
$connect = "mysql:host=".$server.";dbname=".$db; $connect = "mysql:host=".$server.";dbname=".$db;