Added IPHelper implementation (#631)

This commit is contained in:
Roman Kelesidis 2023-03-20 13:52:28 +07:00 committed by GitHub
commit ef4e1aa18f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 152 additions and 60 deletions

View file

@ -299,8 +299,8 @@ if (!isset($_REQUEST['dosearch'])) {
unset($users);
$users = [];
if (Longman\IPTools\Ip::isValid($ip_address)) {
$ip = encode_ip($ip_address);
if (\TorrentPier\Helpers\IPHelper::isValid($ip_address)) {
$ip = \TorrentPier\Helpers\IPHelper::encodeIP($ip_address);
$users[] = $ip;
} else {
bb_die($lang['SEARCH_INVALID_IP']);