forked from GithubBackups/vichan
pages.php: supply multiple DNS names to IP page, if present
This commit is contained in:
parent
d10968a669
commit
843e31ff91
@ -974,8 +974,13 @@ function mod_user_posts_by_ip(Context $ctx, string $cip, ?string $encoded_cursor
|
||||
if ($config['mod']['dns_lookup'] && empty($config['ipcrypt_key'])) {
|
||||
$resolver = $ctx->get(DnsDriver::class);
|
||||
$names = $resolver->IPToNames($ip);
|
||||
|
||||
if (!empty($names)) {
|
||||
if (count($names) === 1) {
|
||||
$args['hostname'] = $names[0];
|
||||
} else {
|
||||
$args['hostname'] = $names;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user